Closed GoogleCodeExporter closed 9 years ago
Hello Guillaume,
Have you tried checking for the existence of the "next" link?
[CODE]
while feed:
# Prepare for next feed iteration
next = feed.GetNextLink()
feed = None
if next:
feed = self.gd_client.GetProfilesFeed(uri=next.href)
else:
feed = None
[/CODE]
Best,
Alain
Original comment by ala...@google.com
on 24 Feb 2011 at 9:47
It's working, thanks!
However, the max-results parameter is of 60 items by default. As I would like
to obtain all profiles (3000+ items), it would take too much time with this
default parameter.
The ProfilesQuery should fix that (in gdata/contacts/client.py), but it is
broken as it does not call the parent __init__function. I will submit a patch.
Original comment by guillaum...@gmail.com
on 1 Mar 2011 at 3:18
Not entirely tested, but I think the ProfilesQuery class should be replaced by
this :
class ProfilesQuery(gdata.client.Query):
def __init__(self, feed=None, **kwargs):
gdata.client.Query.__init__(self, **kwargs)
self.feed = feed or 'http://www.google.com/m8/feeds/profiles/default/full'
Original comment by guillaum...@gmail.com
on 1 Mar 2011 at 3:27
Hello Guillaume,
You're indeed right! This should be something like that:
[CODE]
class ProfilesQuery(gdata.client.Query):
def __init__(self, feed=None, start_key=None, **kwargs):
gdata.client.Query.__init__(self, **kwargs)
self.start_key = start_key
....
[/CODE]
Additionally, you can use a standard request and pass it to the GetFeed method:
[CODE]
query = gdata.client.Query(max_results=600)
feed = gd_client.GetFeed(gd_client.GetFeedUri('profiles'),
desired_class=gdata.contacts.data.ProfilesFeed,
q=query)
[/CODE]
I will send a patch to correct the issue ASAP.
Best,
Alain
Original comment by ala...@google.com
on 1 Mar 2011 at 4:44
Merci Alain!
Original comment by guillaum...@gmail.com
on 1 Mar 2011 at 11:24
The changes have been submitted in the repository.
Best,
Alain
Original comment by ala...@google.com
on 30 Mar 2011 at 8:57
Original issue reported on code.google.com by
guillaum...@gmail.com
on 24 Feb 2011 at 9:39