PokeAPI/pokeapi

Limit doesn't work

benjaminledet opened this issue ยท 18 comments

Hi, when I call an api endpoint like "https://pokeapi.co/api/v2/pokemon/", I'm getting the full list of Pokemon or the doc says :
"Calling any API endpoint without a resource ID or name will return a paginated list of available resources for that API. By default, a list 'page' will contain up to 20 resources. If you would like to change this just add a 'limit' query parameter, e.g. limit=60."

I tried to set the limit too but it doesn't work neither.
Am I doing something wrong?
thanks

Hi, this is a side effect of the outage we had this week. As a quick fix we put the static JSON files on the server. We are in the process of moving to static hosting (see #350) on Netlify, but we're not quite ready to move to that yet. Until then, pagination will probably remain broken.

ok thanks for this very quick answer!

Related: #365

I'm going to close this issue as there is nothing actionable for us at the moment. As @cmmartti mentioned, it will be fixed as soon as we move to Netlify. Apologies in the meantime!

so what does this mean?

@sargtier1 It means that queries that include either ?limit=100 or ?offset=100 (any numbers) will not respect the requested page and will instead return the entire result set, however large it is. This is temporary and will probably be fixed by the end of the week or next week.

@sargtier1 It means that queries that include either ?limit=100 or ?offset=100 (any numbers) will not respect the requested page and will instead return the entire result set, however large it is. This is temporary and will probably be fixed by the end of the week or next week.

thanks for the feed back brother!

Is this still an issue

@cbouwense Yes it is - it will be until we complete our move to static hosting, which is hopefully going to be shortly!

This shouldn't be closed as it is still an issue.

Is there a rough guesstimate of when this is going to be fixed?

No, sorry

@slothenly This will be fixed by tomorrow if things work out. We've finally figured out an automatic deploy process for static hosting on Firebase and just need to set up HTTPS and switch the DNS settings.

Any updates? Hoping to use this API to build out a project by the end of the week, but was wondering if I should swap to a different resource.

@slothenly Hi, sorry this is taking so long. We're all volunteers, and apparently everyone is quite busy. I can't make any promises for when it will be done, so I won't.

I believe someone else is hosting a copy of the API at http://pokeapi.salestock.net/api/v2/ that you can use if the official one isn't done yet. It's a bit out-dated, but it works.

Any updates? I know the effort of all you guys, just asking because I would like to know if you have any prediction of when this problem will be solved :).

Thanks!