Closed Skillz4Killz closed 6 years ago
curl -g "https://api.dc01.gamelockerapp.com/shards/na/players?filter[playerName]=AR45A" \
-H "Authorization: Bearer API_KEY" \
-H "Accept: application/vnd.api+json"
Returns 2 players. Use the 2nd one. Also, Patch changes are not retroactive as far as I know. So a new patch values like played_* will not show for players who have not played atleast 1 game in the new patch.
{
"data": [
{
"type": "player",
"id": "35b8c1de-ba6a-11e6-ab37-062cb73cdbb1",
"attributes": {
"createdAt": "2017-07-17T13:24:28Z",
"name": "AR45A",
"patchVersion": "",
"shardId": "na",
"stats": {
"elo_earned_season_4": 0,
"elo_earned_season_5": 549.10551986494,
"elo_earned_season_6": 1401.9671703770687,
"elo_earned_season_7": 1507.6573686805564,
"karmaLevel": 2,
"level": 29,
"lifetimeGold": 11719.998046875,
"lossStreak": 0,
"played": 1266,
"played_ranked": 417,
"skillTier": 12,
"winStreak": 0,
"wins": 662,
"xp": 172440
},
"titleId": "semc-vainglory"
},
"relationships": {
"assets": {
"data": []
}
},
"links": {
"schema": "https://raw.githubusercontent.com/madglory/gamelocker-vainglory/master/schemas//player_index.json",
"self": "https://api.dc01.gamelockerapp.com/shards/na/players/35b8c1de-ba6a-11e6-ab37-062cb73cdbb1"
}
},
{
"type": "player",
"id": "3bd5aac2-91f2-11e7-ae16-029cb633549e",
"attributes": {
"createdAt": "2017-09-20T14:13:50Z",
"name": "AR45A",
"patchVersion": "2.8",
"shardId": "na",
"stats": {
"elo_earned_season_4": 0,
"elo_earned_season_5": 549.105519865,
"elo_earned_season_6": 1401.96717038,
"elo_earned_season_7": 1507.65736868,
"elo_earned_season_8": 0,
"elo_earned_season_9": 0,
"karmaLevel": 2,
"level": 30,
"lifetimeGold": 12093.3310546875,
"lossStreak": 0,
"played": 0,
"played_aral": 620,
"played_blitz": 669,
"played_casual": 871,
"played_ranked": 498,
"skillTier": 16,
"winStreak": 0,
"wins": 1003,
"xp": 175450
},
"titleId": "semc-vainglory"
},
"relationships": {
"assets": {
"data": []
}
},
"links": {
"schema": "https://raw.githubusercontent.com/madglory/gamelocker-vainglory/master/schemas/2.8/player_index.json",
"self": "https://api.dc01.gamelockerapp.com/shards/na/players/3bd5aac2-91f2-11e7-ae16-029cb633549e"
}
}
],
"links": {
"self": "https://api.dc01.gamelockerapp.com/shards/na/players?filter[playerName]=AR45A"
},
"meta": {}
}
That changes the question from why the old format to why does this player have 2 player objects returned?
He plays matches every day I have confirmed it myself.
The new values are being shown for him in the second player object. This is so weird. This means he plays daily so why does he have two player objects.
{
"type": "player",
"id": "3bd5aac2-91f2-11e7-ae16-029cb633549e",
"attributes": {
"createdAt": "2017-09-20T14:13:50Z",
"name": "AR45A",
"patchVersion": "2.8",
"shardId": "na",
"stats": {
"elo_earned_season_4": 0,
"elo_earned_season_5": 549.105519865,
"elo_earned_season_6": 1401.96717038,
"elo_earned_season_7": 1507.65736868,
"elo_earned_season_8": 0,
"elo_earned_season_9": 0,
"karmaLevel": 2,
"level": 30,
"lifetimeGold": 12093.3310546875,
"lossStreak": 0,
"played": 0,
"played_aral": 620,
"played_blitz": 669,
"played_casual": 871,
"played_ranked": 498,
"skillTier": 16,
"winStreak": 0,
"wins": 1003,
"xp": 175450
},```
Hey dudes - Yep, not retroactive. Players (now) have a patchVersion, so you can link it to schema for that patch too. Basically we can't update players until we have new data about them (which means they need to play). It's another issue of "there's no way around understanding multiple schema versions" :)
Good news: we include a link to the schema that, if populated, might help. If the schema is missing, pull request welcome!
This player plays daily I confirmed it myself. This means he Should not have outdated data. If they had not played i understand but this player plays every day multiple matches
Also why does this player have 2 player objects returned as opposed to 1?
Have found a lot more players with this same issue now. They play consistently and their player object is not updating to the new schema and they return 2 player objects instead of 1. Not sure what is causing this but it is a really big issue.
Recently the /player was changed from showing
played
to showing different played amounts per game mode. However, this player still has the old format. His matches are correct and up to date, but his player is not.Expected Behaviour
The player data should be returned in the proper new format with
played_casual
played_ranked
etc but it is not.Current Behaviour
It is sending the data as the older format.
Possible Solution
Fix to show new format
Steps to Reproduce (for bugs)
AR45A
Context
The player is getting variables on his profile on EZLBot with
NAN
because you can not use undefined in a mathematical formula to calculate games lost or win rate etc... It also shows as undefined for the Game Mode Specific values