Giter Site home page Giter Site logo

osrs-prices-api-wrapper's Introduction

OSRS Wiki prices API wrapper

Wrapper for the OSRS wiki prices API

Usage

Initialize the API class with a user agent and contact as arguments

api = PricesAPI("DESCRIPTION OF APP HERE", "CONTACT ADDRESS HERE")

Retrieve the latest available prices

latest = api.latest()

latest_mapped = api.latest(mapping=True)

The mapping argument adds additional information about each item (available from the /mapping endpoint) to the return value.

It is also possible to return the prices as a pandas dataframe:

latest_df = api.latest_df(mapping=True)

Retrieve volumes

volumes = api.volumes(mapping=True)

volumes_df = api.volumes_df(mapping=True)

Retrieve timed pricing data

prices = api.prices("5m", mapping=True)

prices_df = api.prices_df("5m", mapping=True)

Valid time values are: 5m, 1h, 6h and 24h

Retrieve time series data

timeseries = api.timeseries("5m", 2)

timeseries_df = api.timeseries_df("5m", 2)

The first argument is the time interval, second argument is the item ID

Valid time values are: 5m, 1h, 6h and 24h

Retrieve mapping data

mapping = api.mapping()

mapping_df = api.mapping_df()

osrs-prices-api-wrapper's People

Contributors

jonashogman avatar

Stargazers

 avatar

Watchers

 avatar  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.