Code Monkey home page Code Monkey logo

osrs-json-item-information's Introduction

OSRS-JSON-Item-Information

The OSRS Market API is a bit poorly designed (in my opinion) as it requires you to iterate through item IDs to get the name of the item. This means that, in some applications, you have to iterate through every item ID to check the name of the item if you're looking for information on a specific item.

This list is a fix for that. It displays some basic information of items in OSRS (including current market information based off of RSBuddy's API) and is updated regularly by one of my discord bots. That means that, for the most part, this information will contain up to date information. Most importantly, however, the keys in this JSON list are based off of the item's NAME instead of it's id.

Prior, to get the Store Price of an item (without knowing it's item ID prior), you had to do this:

for i in ITEMS:
	if ITEMS[i]['name'] == "Rune Dagger":
		itemPrice = ITEMS[i]['sp']

However, now with this new list, looking up a specific item is as easy as this:

itemPrice = ITEMS['rune dagger']['store_price']

This saves your application time and thus resources while searching for user supplied item information.

Hope it helps!

Back-link to Patreon with other information

https://www.patreon.com/Coffee_Fueled_Deadlines Link above links to patreon page with information on Discord Bots and other applications.

osrs-json-item-information's People

Contributors

coffee-fueled-deadlines avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.