February 5, 20178 yr I've had the need to write both of these in a script currently under development. RSBuddy's price API didn't seem to update often enough (or just not return the proper data). The PriceLookup API uses Jagex's JSON API for their website. The Item ID to/from Name API uses a (relatively modern) list of IDs and Names which I added to database. Simply change the function being executed in the URL and enter the proper argument. Downloads can be found on my website below http://polycoding.com/osb/ 37 minutes ago, Trees said: In order to avoid the overhead of having to make web calls or parsing a text file, I went ahead and made a serialized hashmap of the items. The serialized file can be found here and the code to serialize it can be found here. Old School RuneScape Id to/from Name API Get an item's ID from its name. http://polycoding.com/osb/itemIdNames.php?getId=ITEM_NAME Get an item's name from its ID. http://polycoding.com/osb/itemIdNames.php?getName=ITEM_ID Polycoding Old School RuneScape Grand Exchange Price Lookup Usage public PriceLookup prices = new PriceLookup(); System.out.println(prices.getPriceById(1333)); //print price for Rune Scimitar by inputting ID System.out.println(prices.getPriceByName("rune scimitar")); //print price for Rune Scimitar by inputting name System.out.println(prices.getId("rune scimitar")); //getting the ID of Rune Scimitar using Polycoding API Edited April 27, 20178 yr by Polymorphism
February 5, 20178 yr 24 minutes ago, Polymorphism said: I've had the need to write both of these in a script currently under development. RSBuddy's price API didn't seem to update often enough (or just not return the proper data). The PriceLookup API uses Jagex's JSON API for their website. The Item ID to/from Name API uses a (relatively modern) list of IDs and Names which I added to database. Simply change the function being executed in the URL and enter the proper argument. Downloads can be found on my website below http://polycoding.com/osb/ Old School RuneScape Id to/from Name API Get an item's ID from its name. http://polycoding.com/osb/itemIdNames.php?getId=ITEM_NAME Get an item's name from its ID. http://polycoding.com/osb/itemIdNames.php?getName=ITEM_ID Polycoding Old School RuneScape Grand Exchange Price Lookup Usage public PriceLookup prices = new PriceLookup(); System.out.println(prices.getPriceById(1333)); //print price for Rune Scimitar by inputting ID System.out.println(prices.getPriceByName("rune scimitar")); //print price for Rune Scimitar by inputting name System.out.println(prices.getId("rune scimitar")); //getting the ID of Rune Scimitar using Polycoding API It's best to use Osbuddy. They update the prices every x seconds. As jagex does every 1min - x (can't remember). Kappa I didn't read. From what I can see tho, rsbuddy uses their own prices and their prices are based off of the amount of buys/sells people make through osbuddy. Edited February 5, 20178 yr by Satire
February 5, 20178 yr Author 13 hours ago, Satire said: It's best to use Osbuddy. They update the prices every x seconds. As jagex does every 1min - x (can't remember). Kappa I didn't read. From what I can see tho, rsbuddy uses their own prices and their prices are based off of the amount of buys/sells people make through osbuddy. This explains the need i had to just scrape jagex's website.
February 7, 20178 yr Author I added a shit ton of items with updated ids. itemIdNames.php now outputs all ids and names in the format below without new lines id:name; Also, clicking on the 2 small code boxes will navigate you to that url
April 27, 20178 yr In order to avoid the overhead of having to make web calls or parsing a text file, I went ahead and made a serialized hashmap of the items. The serialized file can be found here and the code to serialize it can be found here. Edited April 27, 20178 yr by Trees
April 27, 20178 yr Author 36 minutes ago, Trees said: In order to avoid the overhead of having to make web calls or parsing a text file, I went ahead and made a serialized hashmap of the items. The serialized file can be found here and the code to serialize it can be found here. Awesome, thank you! Will add to OP.
April 28, 20178 yr This is pretty cool I remember having a few issues with some personal scripts that I was developing when I wanted to get real-time price data for items which I had no direct way of getting the ID for. I noticed that OSBuddy only seemed to offer an ID-based price grabbing API so, not being motivated to create a system like yours, I just used my inventory listener to map ids to names - a less neat solution. If I had seen this earlier I would have used it. I will keep this page bookmarked for future projects - thanks for this! (: -Apa
May 1, 20178 yr I'm making use of static variations of the price fetch methods. Work like a charm. Thanks a bunch! Edited May 1, 20178 yr by Adept
August 12, 20187 yr 2 hours ago, tinnetju said: Can you reupload this somewhere? Would love to use this Just use / modify this Or this
Create an account or sign in to comment