Open GoogleCodeExporter opened 9 years ago
So after more searching I found this comment in the API:
Alternatively you can add new parameters directly to the query object.
queryUrl = DataFeedQuery()
queryUrl.query['max-results'] = '10000'
Meaning I can just add 'segment' to my query via this method. Problem solved.
Original comment by wearesch...@gmail.com
on 30 Jun 2010 at 5:51
I tried the above method of adding a segment e.g.:
query['segment']='dynamic::ga:pagePath=~/software/'
and this does indeed append the segment parameter to my data feed URI, but the
data that gets returned doesn't seem to have been altered by the segment at
all. I checked the URI the python URI created against one created by the Data
Feed Query Explorer and they are the same. So why is the data being returned
different?
Original comment by wearesch...@gmail.com
on 1 Jul 2010 at 12:16
I'm seeing this issue as well, and seem to be able to reproduce it outside of
the Python gData package. I built a request and hit the API using httplib2, and
received the same inaccurate results that I did as using the gData tools. It
seems like segments are just being ignored.
Original comment by xxf4n...@gmail.com
on 27 Jul 2010 at 9:15
Was having the same problem where segment was not being honored. Turns out that
gdata internally uses version 1.0 of the API by default. You have to override
that header by adding extra headers to your API call. In the python client,
this looks like this:
extra_headers = { 'GData-Version' : '2' }
feed = self.client.GetFeed(feed_url, extra_headers=extra_headers)
Original comment by shabbir....@gmail.com
on 29 Jul 2010 at 11:03
Original comment by afs...@google.com
on 19 Dec 2011 at 12:33
Original issue reported on code.google.com by
wearesch...@gmail.com
on 29 Jun 2010 at 11:35