JavaScript is required to use Bungie.net

Group Avatar

BungieNetPlatform

"Updates, discussions, and documentation of the BungieNetPlatform API."

Request Join
originally posted in:BungieNetPlatform
2/25/2015 12:15:07 AM
1

Getting gametype from PostGameCarnageReport (PVP)

So inside a PostGameCarnageReport endpoint we have the data -> activityDetails -> mode field which is an integer corresponding to IDs like this 0 => 'None', 1 => 'Unknown', // unknown 2 => 'Story', 3 => 'Strike', 4 => 'Raid', 5 => 'AllPvP', 6 => 'Patrol', 7 => 'AllPvE', 8 => 'PvPIntroduction', 9 => 'Skirmish', 10 => 'Control', 11 => 'Salvage', 12 => 'Clash', 13 => 'Rumble', 14 => 'Unknown', // unknown 15 => 'Doubles Skirmish' This allows us to match GametypeID to the human readable name. However, if we include definitions we see the [i]activityTypes[/i], with one entry being the gametype in that PVP match. Now, I do some caching of the definitions, so unless required I'm not requesting definitions. This makes my only method to understand gametype via that `[i]mode[/i]` integer. Now I have no problem using this hardcoded list to get title, but I want access to the title, description and icon hidden away in that [i]activityTypes[/i] definition. However, my only connection is an integer which doesn't appear in that activityType, so I cannot cross reference them. I searched for the [i]activityHash[/i] in the response and found it in 3 places. 2 being [i]activityTypes[/i], but one was found in the activities entry labeled [i]activityTypeHash[/i]. Activities corresponds to maps in PVP, which I have cached. So I'm not able to rely on re-reading that. Is there anyway to get the [i]activityType[/i] hash alongside the mode integer? Or maybe explain to me I'm an idiot messing something up :) [b]Current[/b] activityDetails: { referenceId: 292191301, instanceId: "1615604895", mode: 15 }, [b]Proposed[/b] activityDetails: { referenceId: 292191301, instanceId: "1615604895", mode: 15, activityId: "3957072814" },

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

You are not allowed to view this content.
;
preload icon
preload icon
preload icon