https://dev-api.[API BASE NAME].com/v1/stats/players?sort=kills&sortOrder=desc&seriesId=[series key]&page=2
For now I'm just running a local NodeJS server that fetches all pages and provides it as a new endpoint at
localhost:3000/players
I'm going to also ask our API dev if we can add filters in so I can keep below his arbitrary limit and still get the objects I need in one return (he isn't budgeting on raising the limit). But a local node server gets us on air - its just becomes one more thing to restart when the PC restarts.
------------------------------
Nick Huntley
------------------------------
Original Message:
Sent: 08-22-2024 09:31
From: Azathoth Son of Cthulhu
Subject: Paginated REST APIs
What is the whole query string? Is it just page?
------------------------------
Azathoth
Son of Cthulhu
Original Message:
Sent: 08-21-2024 22:25
From: Nick Huntley
Subject: Paginated REST APIs
Thats what I was afraid of. For this event I can probably just spin up a Node server that grabs all pages and then spits out the full JSON (or hosts it for the RSS provider to grab). I was hoping I was missing something simple to force DLS to scrape all pages of a result but sounds like this is more of an api-side issue than it is something DLS can solve natively.
------------------------------
Nick Huntley
Original Message:
Sent: 08-20-2024 08:16
From: Azathoth Son of Cthulhu
Subject: Paginated REST APIs
Off the cuff ...
Sounds like you are getting data from a third party service.
Communicate with the service (or fuzz it {don't}) to see if you can get more data per page.
Or,
you need an internal server that scrapes data that takes multiple queries and then formats the data for Datalinq. This is the sort of thing Raspberry PI was born for.
------------------------------
Azathoth
Son of Cthulhu
Original Message:
Sent: 08-19-2024 19:07
From: Nick Huntley
Subject: Paginated REST APIs
Does anyone have any tricks to receiving the entire payload from a paginated REST API?
I have an API that only returns 25 rows per scrape and I need all 60 rows. It accepts the argument ?page=2
but I have not found a way to have Datalinq server scrape all pages and present me with the full data sample.
------------------------------
Nick Huntley
------------------------------