API Wrapper for Bungie.net in Node.js
npm install node-bungieapi
npm install node-bungieapi
`
Config
`
const BungieNetAPI = require('node-bungieApi')
export const bungieNet = new BungieNetAPI({
key: 'X-API-KEY',
oauthConfig: {
id: 'CLIENT-ID',
}
})
`
Usage
$3
`
BungieNetAPI.app_oAuthToken(code) // code retuned from bungie auth site
.then(body => {
var oAuthData = body;
});
`
$3
`
BungieNetAPI.destiny2_GetPublicMilestones()
.then(body => {
var response = body.Response;
});
`
Currently supported endpoints
####User
- GetMembershipDataForCurrentUser
`
user_GetMembershipsForCurrentUser(accessToken)
`
####Group V2
- GetGroup
`
groupV2_GetGroup(groupId)
`
- GetMembersOfGroup
`
groupV2_GetMembersOfGroup(groupId)
`
- GetGroupByName
`
groupV2_GetGroupByName(groupName, groupType)
`
####Destiny2
- GetProfile
`
destiny2_GetProfile(membershipType, destinyMembershipId, destinyComponentType)
`
- GetPublicMilestones
`
destiny2_GetPublicMilestones()
`
- GetDestinyManifest
`
destiny2_GetDestinyManifest()
`
- SearchDestinyPlayer
`
destiny2_SearchDestinyPlayer(membershipType, displayName)
`
- GetCharacter
`
destiny2_GetCharacter(membershipType, destinyMembershipId, characterId, destinyComponentType)
``