Pages: [1] :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Moryg H'qarr
GeoCorp. Curatores Veritatis Alliance
3
|
Posted - 2016.12.12 17:43:13 -
[1] - Quote
I'm currently using CREST, wanted to switch everything to ESI.
Turns out, the ESI regional market data (all orders, no type filter) return just an array, so there's really no way of figuring how many pages there are in advance. Is there an ingame channel / slack where ccp & 3rd party devs hang out? |
Avrora Primogenitor
Suddenly Ninjas Tear Extraction And Reclamation Service
0
|
Posted - 2016.12.13 10:06:01 -
[2] - Quote
I chose for the Eve-central API. Why? Because then I don't have to bother doing calculations and keeping historical data about market orders myself. Saves storage since historical data builds up quite quick.
EDIT: Register for #DevFleet slack: https://www.fuzzwork.co.uk/tweetfleet-slack-invites/ |
Moryg H'qarr
GeoCorp. Curatores Veritatis Alliance
3
|
Posted - 2016.12.13 11:24:38 -
[3] - Quote
Thanks.
I don't mind doing the calculations and currently have no plans to store history, just the current state (and that works just fine). I swapped back to CREST for now and will implement ESI for market at a later stage. |
Blacksmoke16
Resilience.
34
|
Posted - 2016.12.13 14:38:59 -
[4] - Quote
I use https://market.fuzzwork.co.uk/api/
However if you wanted to get the data from ESI you could just have it start on page 1, get data move onto page two and repeat. When you reach the final page it would be an empty array. So you could do something like this
Pseudo code:
url = https://esi.tech.ccp.is/latest/markets/10000002/orders/?page=1
response = HTTP_GET(url)
if response.data.length > 0 for each obj in response // parse the array of objs here |
Moryg H'qarr
GeoCorp. Curatores Veritatis Alliance
3
|
Posted - 2016.12.13 16:05:12 -
[5] - Quote
Yeah, I did just that. But it takes more requests - CREST returns in batches of 30k, ESI in batches of 10k and you tend to do it sequentially. With CREST, I make the request for the first page, then queue up the rest at once. With ESI I could queue up requests for several pages at once and keep doing that until one of them came back empty to speed it up. But that seems inefficient.
I'll leave it on CREST for now, my ESI code is working so I can swap at any time, I just find the market request more awkward to work with at the moment. |
|
|
|
Pages: [1] :: one page |
First page | Previous page | Next page | Last page |