Bungie-net / api

Resources for the Bungie.net API
Other
1.22k stars 92 forks source link

How to determine user's destiny expansions ? Shadowkeep, Forsaken, Beyond Light... #1406

Closed WolandRoot closed 3 years ago

WolandRoot commented 3 years ago

Hi, I'm integrating api with discord bot and want to know how to collect information about specified player expansions (using membershipId). I've got information about season ownership but one can acquire a season without acquiring an expansion. For example it's possible you own Season of The Hunt but haven't got the access to Deep Stone Crypt activity as a result of not having Beyond Light expansion.

My problem is: How to determine if a player owns a specific expansion using bungie net API?

joshhunt commented 3 years ago

GetProfile with ?components=100 It's as versionsOwned. It's a flag/bitwise enum, so you'll need to do the checks for each version.

https://data.destinysets.com/api/Destiny2.GetProfile?destinyMembershipId=4611686018469271298&membershipType=2&components=100

https://bungie-net.github.io/index.html#/components/schemas/Destiny.Entities.Profiles.DestinyProfileComponent

WolandRoot commented 3 years ago

Thank You