1.0.3 • Published 7 years ago

node-destiny v1.0.3

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

node-destiny

Node library for interacting with Destiny API

Build Status

Installation

npm install node-destiny

Example Usage

const apiKey = process.env.BUNGIE_API_KEY;
const destiny = require('node-destiny');
const destinyClient = new destiny.DestinyClient( apiKey );

Each method on DestinyClient returns a Promise. Here is an example of searching for an Xbox player:

// membershipType of '1' means this is an Xbox Player
destinyClient.search('1', 'Carsten').then( response => {
    //do something with the response
});

Check out the DestinyClient to see all available methods.

By default, these endpoints will return data that includes unique identifiers for all items, events, activities, etc... In order to look up the corresponding text value of these ids, you must tell the API to return 'definitions' with each call. This is done as follows:

destinyClient.definitions = true;

This will make all API requests return definitions until you set definitions back to false;

For more information about what each method does and paramaters available, see Bungies API Documentation.

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago