Get item from API using item name?

Get item from API using item name?

in API Development

Posted by: UnknownFreak.2805

UnknownFreak.2805

Hio!

I’m currently working on a overlay project, and was wondering if you can easily get the item from v2/items by using a item name, how should I do this?

Was thinking of making a map of <itemName,itemID>, but that will require me to go trough every item id in the item list, and that is a bit tedious, I can do it, and then save every <itemName, itemID> locally, so I can access it faster next time.

Or will it be possible to add a search to v2/items by name?

How to crashreport…
Someone say game crash must be related to OOM
when you read the log it’s not related to that whatsoever…

(edited by UnknownFreak.2805)

Get item from API using item name?

in API Development

Posted by: smiley.1438

smiley.1438

Simply put: you will need your own database to do a reverse search.

Get item from API using item name?

in API Development

Posted by: Lawton Campbell

Lawton Campbell

Web Programmer

that will require me to go trough every item id in the item list, and that is a bit tedious

It’s a lot faster if you paginate through all the items, e.g. /v2/items?page=0&page_size=200. The total number of pages is returned in the X-Page-Total response header (or you can continue until you get a “no more pages” error). I’d recommend doing this nightly since items don’t appear in the list until they’re discovered by players, which happens fairly regularly.

Get item from API using item name?

in API Development

Posted by: UnknownFreak.2805

UnknownFreak.2805

Ok, will try that

How to crashreport…
Someone say game crash must be related to OOM
when you read the log it’s not related to that whatsoever…