BUG Api - Lesson leaderboards returns 49 players, not 50

Sort:
Mig_Well

Hello,

Well, what the title says happy.png I noticed a bug in the API to fetch leaderboards (https://api.chess.com/pub/leaderboards). All categories seem to work properly with the exception of lessons which returns only 49 players instead of 50.

ljvankuiken

The last item is numbered forty-nine, the first, 0, That's fifty items.

Nevfy
ljvankuiken wrote:

The last item is numbered forty-nine, the first, 0, That's fifty items.

That's true for all categories unless "lessons" as @Mig_Well said. I confirm. Player with rank 43 is missing.

lessons[41]['rank'] == 42

lessons[42]['rank'] == 44

ljvankuiken

My mistake. As the great Wizard of Oz once said, "Pay no attention to the man behind the curtain!"

tortoises3

In arrays of many languages, the first value in it is 0, with 1 being the second, and do on.

Mig_Well

@tortortoises3 You can check the other posts above. I know that in a list of 50 items, they are commonly counted from 0 to 49. So having the last item being number 49 is not surprising but also unrelated to this issue I reported.

 

If you open https://api.chess.com/pub/leaderboards, you'll see that the lesson list only contains 49 items (going from 0 to 48) instead of 50 (going from 0 to 49).