DestinyDevs / BungieNetPlatform

A community run wiki for the Bungie.net Platform APIs.
https://destinydevs.github.io/BungieNetPlatform/
MIT License
106 stars 12 forks source link

[Question] How to detect the activity type / name #13

Open joshlopes opened 6 years ago

joshlopes commented 6 years ago

http://raid.reports seems to be able from a few calls:

to find the completions for each raid type individually. I have tried myself but without any luck and i can't find anything that would help me.

Can you please give me some tips where i can find the key , string, enum that would help me distinct the types ? I don't need this much information, all i want is from the bungie api to grab the total completions for a player (cross all characters) for each type of raid, EoW and Leviathan.

Thank you, great job!

joshlopes commented 6 years ago

@lowlines do you think you can help me with this one ?

unisys12 commented 6 years ago

@joshlopes Even though this area is not meant specifically for API questions, I will go ahead and try to steer you in the right direction to the best of my ability. In the future though, might I suggest this Discord Server (https://discord.gg/CBX2pnw).

To detect the activityType and activityName, using your first link above, you will need to look-up each Response.activities[0].activityHash against the endpoint https://www.bungie.net/Platform/Destiny2/Manifest/DestinyActivityDefinition/{activityHash}. From here, you can access the name of the activity by way of Response.displayProperties.name and the activity type by Reponse.activityTypeHash. This hash, can be looked up using the endpoint https://www.bungie.net/Platform/Destiny2/Manifest/DestinyActivityDefinition/{activityTypeHash}. The name of the activityType can be found at Response.displayProperties.name

Hope this helps you out. :)