StunlockStudios / battlerite-docs

Documentation and Guides
11 stars 1 forks source link

Spectators coming through as participants #8

Closed ankemp closed 6 years ago

ankemp commented 6 years ago

If you look at participants, you'll see a bunch of players that have no details about them - except their IDs and championId 0. ** you might notice this JSON structure is a bit different than yours - we are doing a bit of data mapping for ease of use on our end.

{
   "id":"857D0E69EF5F4C0EAF3A794E5BD1E6E9",
   "createdAt":"2017-12-18T00:45:49.000Z",
   "duration":583,
   "gameMode":"1733162751",
   "patchVersion":"39931",
   "shardId":"global",
   "matchType":"PRIVATE",
   "mapId":"319DDC57E70174B6C85EF137BAF34E9E",
   "map":{
      "id":"319DDC57E70174B6C85EF137BAF34E9E",
      "name":"Blackstone Arena - Night"
   },
   "links":{
      "schema":"",
      "self":"https://api.dc01.gamelockerapp.com/shards/global/matches/857D0E69EF5F4C0EAF3A794E5BD1E6E9"
   },
   "assets":[
      {
         "id":"3e7d0ee9-e38f-11e7-a8ef-0a586460f089",
         "URL":"https://cdn.gamelockerapp.com/stunlock-studios-battlerite/global/2017/12/18/01/03/3e7d0ee9-e38f-11e7-a8ef-0a586460f089-telemetry.json",
         "createdAt":"2017-12-18T01:03:22.000Z",
         "description":"",
         "name":"telemetry"
      }
   ],
   "rosters":[
      {
         "id":"e2f7be8c-2d96-485c-b137-7fd52cdeede4",
         "shardId":"global",
         "score":1,
         "won":false,
         "participants":[
            {
               "id":"c195076b-b2d9-4a67-b30d-83356ba8ee89",
               "championId":"870711570",
               "champion":{
                  "id":"870711570",
                  "name":"Destiny"
               },
               "shardId":"global",
               "stats":{
                  "abilityUses":353,
                  "attachment":294066347,
                  "damageDone":2381,
                  "damageReceived":2625,
                  "deaths":5,
                  "disablesDone":429,
                  "disablesReceived":285,
                  "emote":1398835377,
                  "energyGained":1280,
                  "energyUsed":675,
                  "healingDone":73,
                  "healingReceived":1106,
                  "kills":3,
                  "mount":493133584,
                  "outfit":258487385,
                  "score":2883,
                  "side":1,
                  "timeAlive":322
               },
               "player":{
                  "id":"778276383183998976",
                  "name":"",
                  "patchVersion":"",
                  "shardId":"",
                  "stats":null,
                  "links":{
                     "schema":"",
                     "self":"https://api.dc01.gamelockerapp.com/shards//players/778276383183998976"
                  }
               }
            },
            {
               "id":"785dfe6a-360a-48fe-8a95-626583dbc5a4",
               "championId":"369797039",
               "champion":{
                  "id":"369797039",
                  "name":"Varesh"
               },
               "shardId":"global",
               "stats":{
                  "abilityUses":350,
                  "attachment":706854042,
                  "damageDone":2298,
                  "damageReceived":3887,
                  "deaths":5,
                  "disablesDone":153,
                  "disablesReceived":347,
                  "emote":1653602285,
                  "energyGained":1394,
                  "energyUsed":1075,
                  "healingDone":1268,
                  "healingReceived":1504,
                  "kills":0,
                  "mount":1157189786,
                  "outfit":2063891754,
                  "score":3719,
                  "side":1,
                  "timeAlive":344
               },
               "player":{
                  "id":"7854",
                  "name":"",
                  "patchVersion":"",
                  "shardId":"",
                  "stats":null,
                  "links":{
                     "schema":"",
                     "self":"https://api.dc01.gamelockerapp.com/shards//players/7854"
                  }
               }
            },
            {
               "id":"bdc32286-b497-460b-bb8c-b8e3d32a85f5",
               "championId":"1134478706",
               "champion":{
                  "id":"1134478706",
                  "name":"Poloma"
               },
               "shardId":"global",
               "stats":{
                  "abilityUses":459,
                  "attachment":2088268574,
                  "damageDone":1575,
                  "damageReceived":2565,
                  "deaths":5,
                  "disablesDone":203,
                  "disablesReceived":219,
                  "emote":1170337850,
                  "energyGained":1376,
                  "energyUsed":975,
                  "healingDone":2891,
                  "healingReceived":1045,
                  "kills":0,
                  "mount":1772305103,
                  "outfit":390954791,
                  "score":4669,
                  "side":1,
                  "timeAlive":321
               },
               "player":{
                  "id":"132",
                  "name":"",
                  "patchVersion":"",
                  "shardId":"",
                  "stats":null,
                  "links":{
                     "schema":"",
                     "self":"https://api.dc01.gamelockerapp.com/shards//players/132"
                  }
               }
            }
         ]
      },
      {
         "id":"8d354e51-ebff-41dd-91aa-9e97a232fb9f",
         "shardId":"global",
         "score":5,
         "won":true,
         "participants":[
            {
               "id":"6da80b9b-6217-436b-94fd-d8fe3dfc4f14",
               "shardId":"global",
               "stats":{
                  "attachment":0,
                  "emote":0,
                  "mount":0,
                  "outfit":0,
                  "side":0
               },
               "player":{
                  "id":"778323489210900480",
                  "name":"",
                  "patchVersion":"",
                  "shardId":"",
                  "stats":null,
                  "links":{
                     "schema":"",
                     "self":"https://api.dc01.gamelockerapp.com/shards//players/778323489210900480"
                  }
               }
            },
            {
               "id":"34d7f316-2977-414b-9c5f-a4a4f44252c8",
               "championId":"39373466",
               "champion":{
                  "id":"39373466",
                  "name":"Jumong"
               },
               "shardId":"global",
               "stats":{
                  "abilityUses":409,
                  "attachment":177447353,
                  "damageDone":3601,
                  "damageReceived":2260,
                  "deaths":1,
                  "disablesDone":469,
                  "disablesReceived":265,
                  "emote":553323459,
                  "energyGained":1906,
                  "energyUsed":1550,
                  "healingDone":324,
                  "healingReceived":1570,
                  "kills":7,
                  "mount":355237393,
                  "outfit":1471164257,
                  "score":4394,
                  "side":2,
                  "timeAlive":352
               },
               "player":{
                  "id":"776450744541908992",
                  "name":"",
                  "patchVersion":"",
                  "shardId":"",
                  "stats":null,
                  "links":{
                     "schema":"",
                     "self":"https://api.dc01.gamelockerapp.com/shards//players/776450744541908992"
                  }
               }
            },
            {
               "id":"524b853d-59d9-47de-8e24-10ec2edaa9ac",
               "championId":"1134478706",
               "champion":{
                  "id":"1134478706",
                  "name":"Poloma"
               },
               "shardId":"global",
               "stats":{
                  "abilityUses":460,
                  "attachment":175987216,
                  "damageDone":2232,
                  "damageReceived":1292,
                  "deaths":1,
                  "disablesDone":164,
                  "disablesReceived":193,
                  "emote":1170337850,
                  "energyGained":1345,
                  "energyUsed":950,
                  "healingDone":2361,
                  "healingReceived":936,
                  "kills":3,
                  "mount":355237393,
                  "outfit":1421950681,
                  "score":4761,
                  "side":2,
                  "timeAlive":342
               },
               "player":{
                  "id":"784917280495644672",
                  "name":"",
                  "patchVersion":"",
                  "shardId":"",
                  "stats":null,
                  "links":{
                     "schema":"",
                     "self":"https://api.dc01.gamelockerapp.com/shards//players/784917280495644672"
                  }
               }
            },
            {
               "id":"ea498a8a-2478-4234-9c5a-f4f010d7ab66",
               "championId":"763360732",
               "champion":{
                  "id":"763360732",
                  "name":"Shifu"
               },
               "shardId":"global",
               "stats":{
                  "abilityUses":458,
                  "attachment":24061436,
                  "damageDone":3593,
                  "damageReceived":2319,
                  "deaths":1,
                  "disablesDone":218,
                  "disablesReceived":327,
                  "emote":268615719,
                  "energyGained":1713,
                  "energyUsed":1000,
                  "healingDone":907,
                  "healingReceived":1429,
                  "kills":5,
                  "mount":1777386147,
                  "outfit":548281660,
                  "score":4718,
                  "side":2,
                  "timeAlive":362
               },
               "player":{
                  "id":"804919733530013696",
                  "name":"",
                  "patchVersion":"",
                  "shardId":"",
                  "stats":null,
                  "links":{
                     "schema":"",
                     "self":"https://api.dc01.gamelockerapp.com/shards//players/804919733530013696"
                  }
               }
            },
            {
               "id":"2c5b3b46-0c0c-4d2f-a8d8-45b77bda94d4",
               "shardId":"global",
               "stats":{
                  "attachment":0,
                  "emote":0,
                  "mount":0,
                  "outfit":0,
                  "side":0
               },
               "player":{
                  "id":"778308050036596736",
                  "name":"",
                  "patchVersion":"",
                  "shardId":"",
                  "stats":null,
                  "links":{
                     "schema":"",
                     "self":"https://api.dc01.gamelockerapp.com/shards//players/778308050036596736"
                  }
               }
            },
            {
               "id":"6357acf9-6c79-49df-9981-3c501269680a",
               "shardId":"global",
               "stats":{
                  "attachment":0,
                  "emote":0,
                  "mount":0,
                  "outfit":0,
                  "side":0
               },
               "player":{
                  "id":"782064337878671360",
                  "name":"",
                  "patchVersion":"",
                  "shardId":"",
                  "stats":null,
                  "links":{
                     "schema":"",
                     "self":"https://api.dc01.gamelockerapp.com/shards//players/782064337878671360"
                  }
               }
            },
            {
               "id":"f124454a-a07e-43d9-995c-4e8209f36196",
               "shardId":"global",
               "stats":{
                  "attachment":0,
                  "emote":0,
                  "mount":0,
                  "outfit":0,
                  "side":0
               },
               "player":{
                  "id":"781929883885531136",
                  "name":"",
                  "patchVersion":"",
                  "shardId":"",
                  "stats":null,
                  "links":{
                     "schema":"",
                     "self":"https://api.dc01.gamelockerapp.com/shards//players/781929883885531136"
                  }
               }
            }
         ]
      }
   ],
   "rounds":[
      {
         "id":"b1879071-8bfe-476b-b3b9-af2f9d04763f",
         "duration":57,
         "ordinal":0,
         "winningTeam":2
      },
      {
         "id":"77e7f8d7-3f3e-441d-b75b-f2f988359a43",
         "duration":57,
         "ordinal":1,
         "winningTeam":2
      },
      {
         "id":"8627f734-040e-4568-bf63-0d96c098a1a2",
         "duration":81,
         "ordinal":2,
         "winningTeam":1
      },
      {
         "id":"ee15166b-3371-42b7-aa69-1a9024965112",
         "duration":46,
         "ordinal":3,
         "winningTeam":2
      },
      {
         "id":"281674a9-b583-433e-86e4-439a9875565e",
         "duration":58,
         "ordinal":5,
         "winningTeam":2
      },
      {
         "id":"9af4425c-ebdb-4cf0-acde-c5ae36d55e4a",
         "duration":64,
         "ordinal":4,
         "winningTeam":2
      }
   ],
   "spectators":[

   ],
   "telemetry":"https://cdn.gamelockerapp.com/stunlock-studios-battlerite/global/2017/12/18/01/03/3e7d0ee9-e38f-11e7-a8ef-0a586460f089-telemetry.json"
}