Client Packages
Setup - Node.js
Installing
npm i nexushub-client
Setting up the Client
const Nexus = require('nexushub-client')
const nexus = new Nexus({
user_key,
user_secret
})
user_key can be found in your profile, while user_secret is your password. User accounts are not required at this point, but will give access to certain endpoints concerning your own user data at a later date.
Basic Usage
GET example
const res = await nexus.get('/foo') // Returns 'bar'
POST, DELETE, etc example
const res = await nexus.post('/post', someObject) // Returns the object
Pub/Sub example
nexus.subscribe('/warframe/v1/orders/opm', opm => {
console.log(opm) // Logs orders per minute every time a new order comes in.
})
Advanced usage
For full docs, check out the official Github repo.