Data received from /players/stats is inconsistent


#1

If one fetches data from /players/{player_id}/stats/{game_id}, the amount of segments (map specific stats) in the received object is not consistent by any means.

Proof:
https://jsfiddle.net/us9h7gtf/2/


#2

Hi Thomaxius,
can you be more specific about the issue?
From the fiddle you provided is not clear (and looks like it’s not working).

Let us know
Lore


#3

The fiddle works just fine, you just need to put your api key in. And open the developer console…

Anyway, the api response looks like this: https://pastebin.com/XTTnez0F

The amount of objects in the segments array varies pretty randomly (as you can see in the fiddle). It seems that maps with 0 wins are left out sometimes.


#4

Hi Thomaxius,
now I can see what you’re pointing out.
I get back to you asap with some news.

Thanks for the feedback!
Lore


#5

Thanks for looking into it.


#7

same thing applies for getting tournaments. Sometimes, I can get until x offset and receive error and when I tried again I receive far more than x offset.


#8

Hi Thomaxius,
the issue has been fixed! Check it out and let us know!

Cheers
Lorenzo


#9

Thanks, seems to work now.

For learning purposes, any chance of telling what the problem was, or was related to?


#10

FYI it was a simple bug in the code…nothing interesting :slight_smile:
I’ll close this thread.

Cheers
Lorenzo


#11