New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
only pulls 50 entries at a time #1
Comments
Hi @ttresslar! yes, the page is just another keyword argument (I should include this info in the docs), and the number of pages comes in the metadata, so you could (supposing a private project): import pyepicollect as pyep
import math
token = pyep.auth.request_token(CLIENT_ID, CLIENT_SECRET)
access_token = token['access_token']
entries = pyep.api.get_entries(SLUG, access_token)
all_entries = entries['data']['entries']
# compute number of pages
per_page = entries['meta']['per_page']
total = entries['meta']['total']
total_pages = math.floor(total/per_page+1)
for page in range(1, total_pages):
# start at page 2 because page 1 is already fetched
entries_page = pyep.api.get_entries(SLUG, access_token, page=page+1)
entries.append(entries_page) I haven't test it because my test project doesn't have more than 50 entries, but I'll try to test it with one of Pablo's projects. |
Great. Thanks. I'll check it out in a bit. |
Hi, is this code working? |
Hello, I haven't use it for long time now... maybe things have changed.... you can make a new "Issue" and show the errors. Cheers |
I just tried the Binder example and it worked fine, so I guess nothing has changed |
Hey Rodrigo,
I was able to check out the package today, it's really great, so much easier to work with than the raw API. The only problem I had is that I can only get the first 50 entries.
The text was updated successfully, but these errors were encountered: