https://github.com/brandonmanke/node-destiny-2
:new_moon: A zero dependency Destiny 2 API wrapper written in Node.js
https://github.com/brandonmanke/node-destiny-2
api bungie-api bungie-destiny-api destiny destiny-2 destiny-api nodejs wrapper
Last synced: 12 months ago
JSON representation
:new_moon: A zero dependency Destiny 2 API wrapper written in Node.js
- Host: GitHub
- URL: https://github.com/brandonmanke/node-destiny-2
- Owner: brandonmanke
- License: mit
- Created: 2017-09-25T00:54:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-06-06T05:51:20.000Z (about 2 years ago)
- Last Synced: 2025-05-30T10:56:26.027Z (about 1 year ago)
- Topics: api, bungie-api, bungie-destiny-api, destiny, destiny-2, destiny-api, nodejs, wrapper
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/node-destiny-2
- Size: 535 KB
- Stars: 26
- Watchers: 3
- Forks: 12
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-destiny-2 [](https://github.com/brandonmanke/node-destiny-2/actions/workflows/node.js.yml) [](https://badge.fury.io/js/node-destiny-2) [](https://codecov.io/gh/brandonmanke/node-destiny-2)
> :new_moon: A zero dependency Destiny 2 API Wrapper written in Node.js
#### Note
The Destiny 2 API is also still being worked on, so some of the endpoints may not work correctly.
## Getting Started
Super simple to set up.
```JavaScript
// Getting API Manifest Example
const Destiny2API = require('node-destiny-2');
const destiny = new Destiny2API({
key: 'your-api-key'
});
```
Get Destiny Manifest Example:
With `.then()`/`.catch()`:
```JavaScript
destiny.getManifest()
.then(res => console.log(`Manifest: ${res.Response}`))
.catch(err => console.log(`Error: ${err}`));
```
With `async`/`await`:
```JavaScript
try {
const res = await destiny.getManifest();
console.log(`Manifest: ${res.Response}`);
} catch (err) {
console.log(`Error: ${err}`);
throw err;
}
```
### Installation
Install from NPM with:
`npm install node-destiny-2`
Or you can build from source via the [releases](https://github.com/brandonmanke/node-destiny-2/releases).
### Examples
See `examples` folder for basic function calls. Planning on adding more detailed ones (see [issues](https://github.com/brandonmanke/node-destiny-2/issues) if you want to help)
### Documentation
For general JSDoc documentation see each file in the `lib` folder. More specifically, `destiny-2-api.js` has fairly detailed documentation for each method call.
For further reading on the API documentation see the [Official Destiny 2 API Documentation](https://github.com/Bungie-net/api).
See [issues](https://github.com/brandonmanke/node-destiny-2/issues) if you are interested in helping improve the available documentation. (I am planning on eventually adding some documentation generator based on JSDoc).
## Contributing
If you see a feature that may need to be added, feel free to send a pull request. Also, feel free to fix or file an [issue](https://github.com/brandonmanke/node-destiny-2/issues) of your own. I will set up a `CONTRIBUTING.md` eventually for code style and a little more information on creating pull requests.
## License
The code in this repository is licensed under the [MIT License](LICENSE). Unless otherwise specified by 3rd party software.