Nodejs package to connect to api.nexus-stats.com, based on blitz-js-query
Installation
npm install nexus-stats-api
Usage
const Nexus = const nexus = nexus // list of all stored items
Configuration
const Nexus = const nexus = key: value
Key | Default | Description |
---|---|---|
use_socket | true | Whether or not to use Socket.io as standard request engine. Setting to false uses http. Subscriptions will use Socket.io regardless. |
namespace | "/" | Socket.io namespace to connect to |
user_key | null | (optional) User key obtained via Auth-Node registration |
user_secret | null | (optional) User secret obtained via Auth-Node |
ignore_limiter | false | Whether or not to disable the default rate limit adaptions. Disabling this only makes sense if you connect as a user who won't face rate limits. If you disable it anyway, expect all your requests to get blocked. |
API
For response formats, check the provisional nexus-stats docs
Item Price Stats
nexus
Get detailed item statistics for a given item. Returns a promise with a statistics object.
Item Price List
nexus
Returns a list of all items and their overall price stats in the last week.
Supply & Demand
nexus
Returns a list of all items and their supply/demand values.
Player Profiles
nexus
Returns the ingame player profile for given user.
Bot Status
nexus
Returns the upstatus for all connected bots.
Subscriptions
Subscriptions allow you to receive real-time data whenever an item is updated. Updates trigger on in-game requests.
nexus
Subscribe to updates on a specific endpoint. Updates can be listened to via
nexus.on(endpoint, fn)
.
Argument | Description | Default |
---|---|---|
endpoint | URL to listen for updates on e.g. /warframe/v1/items/frost prime/statistics |
None |
nexus
Listens to specific Socket.io event, then runs the given function with the received data
Argument | Description | Default |
---|---|---|
ev | Event name. Usually a subscribed endpoint URL. | None |
fn | Function to execute on event trigger | None |
RESTful methods
// GET Requestnexus // POST, PUT, PATCH Requestsnexusnexusnexus // DELETE Requestnexus
Sends a RESTful request to a certain URL (without domain) and returns a promise containing the response data.
See the blitz-js-query documentation for further details on sending RESTful methods.