JavaScript is required to use Bungie.net

Group Avatar

BungieNetPlatform

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

Request Join
originally posted in:BungieNetPlatform
Edited by Reflex: 4/22/2016 8:43:11 PM
1

Issues with API: "undfined" indexes

Hi guys, I'm having an issue with the API when it comes to looking up certain accounts for the Historical Stats endpoint,. If I look up say Deej's account using the AllStrikes mode with the allTime periodType, I get "Undefined index: allTime" errors (using PHP, storing json reponse in a variable and then trying to echo that variable). What does this mean exactly? Has Deej never played a strike or something? Yet if I use another PSN account like Gothalion's using the exact same request, it works exactly fine. I'm just confused what causes this? I set up a test for [url=http://destinydevs.github.io/BungieNetPlatform/docs/API-Test#/GetHistoricalStats/p:characterId=2305843009351947408,destinyMembershipId=4611686018428388138,membershipType=2/q:periodType=3,modes=18,groups=1]Deej[/url] here and one for [url=http://destinydevs.github.io/BungieNetPlatform/docs/API-Test#/GetHistoricalStats/p:characterId=2305843009220759846,destinyMembershipId=4611686018428388122,membershipType=2/q:periodType=3,modes=18,groups=1]Gothalion[/url] here for y'all to quickly check.

Posting in language:

 

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

  • Hmm, yeah - if you look through his history at this page: https://www.bungie.net/en/Stats/RecentGames/2/4611686018428388138/2305843009351947408?mode=all I'm going through them and I've yet to find him playing a Strike, at least on this account! (I have no idea whether he has multiple accounts - I know that some people in the studio have multiple at least so they can play on both XBox and PSN) He seems to be a very PVP-centric person. When a person has never played a game of that type, you're indeed going to get no results, which you'll have to account for in your code. The result will look something like: { "Response": { "allStrikes": {} }, ...

    Posting in language:

     

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

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