Showing Posts For Eearslya.6309:

HEADS UP: OAuth2 being replaced next week

in API Development

Posted by: Eearslya.6309

Eearslya.6309

There’s a very large difference between one-off processes (API keys) vs. doing something multiple times a day (OAuth2 for authentication). Acclimating your users to have to log in all the time makes it easy for even some of the ones that pay attention to that stuff to make a mistake.

You only have to log in once with OAuth2 if you give the application permission to refresh its authentication key.

Blackgate
Harbinger Tryssa – Revenant

Filter items results by type?

in API Development

Posted by: Eearslya.6309

Eearslya.6309

So is Arenanet OK for us to request 69645 items one by one to find the type we want?

Should be fine, though you’ll spend less time if you request whole pages, e.g., enumerate starting from /v2/items?page=0&page_size=200 and look at the response headers (e.g., X-Page-Total) to see how many pages there are.

This will currently take you ~206 requests, which is a lot, but shouldn’t be more than a minute or two to pull down and ingest into e.g., a database.

Sorry for your database haha but what I used 200 java threads to pull the data. Each thread would pull around 200-300 items. All threads running at the same time took them around 5 minutes to collect all the items.

By the way, is there any limit / ip for requests ?

At the moment there is no actual ‘limit’, nothing is stopping you from requesting 60k+ pages at once. But the devs have stated that this is subject to change and they ask that you try not to abuse this freedom.

Blackgate
Harbinger Tryssa – Revenant