Polymorphism Posted February 5, 2017 Share Posted February 5, 2017 (edited) 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, 2017 by Polymorphism 3 Quote Link to comment Share on other sites More sharing options...
Satire Posted February 5, 2017 Share Posted February 5, 2017 (edited) 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, 2017 by Satire 1 Quote Link to comment Share on other sites More sharing options...
Polymorphism Posted February 5, 2017 Author Share Posted February 5, 2017 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. Quote Link to comment Share on other sites More sharing options...
Polymorphism Posted February 7, 2017 Author Share Posted February 7, 2017 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 Quote Link to comment Share on other sites More sharing options...
Polymorphism Posted April 8, 2017 Author Share Posted April 8, 2017 bump...?This is an awesome thing but noone use Quote Link to comment Share on other sites More sharing options...
Trees Posted April 27, 2017 Share Posted April 27, 2017 (edited) 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, 2017 by Trees 1 Quote Link to comment Share on other sites More sharing options...
Polymorphism Posted April 27, 2017 Author Share Posted April 27, 2017 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. Quote Link to comment Share on other sites More sharing options...
Apaec Posted April 28, 2017 Share Posted April 28, 2017 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 2 Quote Link to comment Share on other sites More sharing options...
Adept Posted May 1, 2017 Share Posted May 1, 2017 (edited) I'm making use of static variations of the price fetch methods. Work like a charm. Thanks a bunch! Edited May 1, 2017 by Adept 1 Quote Link to comment Share on other sites More sharing options...
GaetanoH Posted May 1, 2017 Share Posted May 1, 2017 Thanks dude, will definitely use it in my muling script! 1 Quote Link to comment Share on other sites More sharing options...
Polymorphism Posted May 1, 2017 Author Share Posted May 1, 2017 I'm so happy to see this finally being used and appreciated Quote Link to comment Share on other sites More sharing options...
tinnetju Posted August 12, 2018 Share Posted August 12, 2018 Can you reupload this somewhere? Would love to use this Quote Link to comment Share on other sites More sharing options...
Explv Posted August 12, 2018 Share Posted August 12, 2018 2 hours ago, tinnetju said: Can you reupload this somewhere? Would love to use this Just use / modify this Or this 1 Quote Link to comment Share on other sites More sharing options...