I want to use the offset function from ninja api so I get more results in api calling can someone help me?
What API are you trying to use? Can you drop the link here? Every API is different, so I don’t understand what offset function you’re talking about
im using the dogs api from ninja
Next time link the docs here for the API
You didn’t mention you’re trying to use the dogs API, I can only guess that based on the URL you did provide.
Because the docs don’t say how offset works, I googled “results to offset for pagination api”
Because that’s how it’s phrased “To access more than 20 results, use the
offset parameter to offset results in multiple API calls.”
This post explains pretty well how it works
The API comes back with 20 results.
So to get another 5 results, you pass 5 as the offset and make another API call. And after those 2 calls you’d have 25 results
You can get 20 results max for each call, as the docs state
thank you a lot <3