Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export_by_player incorrect work of a boolean argument rated #26

Open
extroot opened this issue Mar 19, 2021 · 1 comment
Open

export_by_player incorrect work of a boolean argument rated #26

extroot opened this issue Mar 19, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@extroot
Copy link

extroot commented Mar 19, 2021

  • berserk version: 0.10.0
  • Python version: 3.9
  • Operating System: Windows

Description

The function rated contains the boolean parameter rated, which takes the values True for rated games and False for casual games. But if you pass this argument as True/False, as the documentation says, then only casual games will be obtained. This parameter will work correctly only if you pass the string value "true"/"false".

What I Did

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

client.games.export_by_player(username='USERNAME', max=1, rated=True)  # {..., 'rated': False, ...}
client.games.export_by_player(username='USERNAME', max=1, rated='true')  # {..., 'rated': True, ...}
@extroot extroot changed the title export_by_player incorrect work of a boolean argument export_by_player incorrect work of a boolean argument rated Mar 19, 2021
@Virinas-code
Copy link
Contributor

I fix it in #38

@rhgrant10 rhgrant10 added the bug Something isn't working label Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants