rhgrant10 / berserk

Python client for the lichess API
https://berserk.readthedocs.io
Other
141 stars 36 forks source link

get_rating_hist returns raw json string instead of list #24

Closed TM90 closed 3 years ago

TM90 commented 3 years ago

Description

When using client.users.get_rating_hist() return value is a string with the list of the dict inside instead of the expected list. This happened suddenly and thus it might be a lichess api change or bug.

What I Did

import berserk
token = 'SUPER-SECRET-TOKEN'
session = berserk.TokenSession(token)
client = berserk.Client(session=session)

rating_hist = client.users.get_rating_history(username='someUserId')
type(rating_hist)
>>> <class str>

It seems that this issue is only impacting get_rating_history other commands like get_live_streamers are returning a list as expected

TM90 commented 3 years ago

This seems to be fixed by lichess and works as intended again