- Notifications
You must be signed in to change notification settings - Fork673
Closed
Description
Currently if you request `xxx.list(as_list=False, per_page=100) you end up getting a list instead of the generator.
I think the logic in inhttp_list needs some rework.
Perhaps just removing the'per_page' in kwargs
conditionfrom here
I should be able to specify something like...
my_generator=gl.projects.list(per_page=100,as_list=False)
... and still get a generator. Then I can hook it up to a progress bar like:
my_generator=gl.projects.list(per_page=100,as_list=False,membership=True)withclick.progressbar(my_generator,length=my_generator.total,label='Projects')asbar:forprojectinbar:pass
The above code generates the following error:
AttributeError: 'list' object has no attribute 'total'
Today if I want to use the generator function I have to leave theper_page
off and get them only 20 at a time; this makes it much slower.
Metadata
Metadata
Assignees
Labels
No labels