我正在尝试使用Google Api Real time通过python客户端库从GA检索数据。
我试图每2小时提取一次数据,但我不知道如何指定提取数据的期限。
例如在Google Api报表中:
class Line:
def __init__(self, p1, p2=None, slope=None):
# test whether syntax is Ok (optional)
if (p2 is None and slope is None) or (p2 is not None and slope is not None):
raise ValueError("Either p2 or slope must be given")
if slope is None:
# ok, initialize the Line object from 2 points p1 and p2
...
else:
# ok, initialize the line object from p1 and slope
...
如何适应此请求以获取最近两个小时的数据? 谢谢。