All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Every datetime.date is now timezone aware, using the CodinGame timezone (UTC).
- ClashOfCode.creation_time can be
None
because of an API change by CodinGame.
- KeyError was raised when using Client.get_clash_of_code because of an API change by CodinGame.
- Removed support for python 3.7 as it has reached its end of life. For more information, see PEP 537.
- KeyError was raised when using Client.get_challenge_leaderboard instead of NotFound because of an API change by CodinGame.
- ValueError when using Client.get_pending_clash_of_code because of a change in datetime format by CodinGame.
- Client.mark_notifications_as_seen and Client.mark_notifications_as_read.
- Notification.mark_as_seen and Notification.mark_as_read.
- Removed support for python 3.6 as it has reached its end of life. For more information, see PEP 494.
- Client.get_unread_notifications.
- Client.get_read_notifications.
- PartialCodinGamer.
- Notification.codingamer.
- Notification.seen, Notification.seen_date, Notification.read and Notification.read_date.
- NotificationType and NotificationTypeGroup enums for Notification.type and Notification.type_group.
- NotificationData and subclasses.
- Deprecated Notification.creation_time in favor of Notification.date
- Removed
Notification._raw
.
- CodinGamer.get_followers and CodinGamer.get_followed now work while being logged in as any user, not just as the user you want to get the followers of.
- ImportError of
codingame.types
submodule when importingcodingame
, the1.2.1
and1.2.2
fixes don't work.
- ImportError of
codingame.types
submodule when importingcodingame
.
- ModuleNotFoundError of
codingame.types
submodule when importingcodingame
.
- Client.request to make requests to CodinGame API services that aren't implemented yet in the library.
codingame.endpoints
submodule.
- Update Client.login to bypass captcha on login endpoint with cookie based authentication, see Login.
Asynchronous client with
Client(is_async=True)
, see Asynchronous client.Context managers:
# synchronous with Client() as client: client.get_global_leaderboard() #asynchronous async with Client(is_async=True) as client: await client.get_global_leaderboard()
More exceptions: LoginError regroups all the exceptions related to login: LoginRequired, EmailRequired, MalformedEmail, PasswordRequired, EmailNotLinked and IncorrectPassword. And NotFound regroups CodinGamerNotFound, ClashOfCodeNotFound, ChallengeNotFound and PuzzleNotFound
ChallengeLeaderboard.has_leagues and PuzzleLeaderboard.has_leagues.
Remove properties like
CodinGamer.followers
in favor of methods like CodinGamer.get_followers to better differentiate API calls and to make it compatible with async API calls. Here's a list of all of the changed ones:Client.language_ids
-> Client.get_language_idsClient.notifications
-> Client.get_unseen_notificationsCodinGamer.followers
-> CodinGamer.get_followersCodinGamer.followers_ids
-> CodinGamer.get_followers_idsCodinGamer.following
-> CodinGamer.get_followedCodinGamer.following_ids
-> CodinGamer.get_followed_idsCodinGamer.clash_of_code_rank
-> CodinGamer.get_clash_of_code_rank
Make all attributes of CodinGame models read-only.
Change type of ClashOfCode.time_before_start and ClashOfCode.time_before_end from float to datetime.timedelta.
Rewrite the way the client works to implement a class to manage the connection state and separate the Client that the user uses from the HTTP client that interacts with the API.
- Remove argument type validation, not my fault if you can't read the docs.
- Client.get_global_leaderboard with GlobalLeaderboard and GlobalRankedCodinGamer.
- Client.get_challenge_leaderboard with ChallengeLeaderboard, ChallengeRankedCodinGamer and League.
- Client.get_puzzle_leaderboard with PuzzleLeaderboard, PuzzleRankedCodinGamer and League.
- Update docs style, code style and tests.
- Get a user with their user ID in Client.get_codingamer.
CodinGamer.followers_ids
andCodinGamer.following_ids
properties to get information about followed users and followers without logging in.CodinGamer.clash_of_code_rank
.
- Support for python 3.9.
- Searching for a CodinGamer with their pseudo in Client.get_codingamer.
- CodinGamer.xp, thanks @LiJu09 (#3).
- Renamed
Notification.date
to Notification.creation_time.
Client.notifications
property.- Notification class.
- LoginRequired exception.
- Client.login.
- Client.logged_in and Client.codingamer.
Client.language_ids
property.CodinGamer.followers
andCodinGamer.following
properties.
- Argument type validation.
- Client.get_clash_of_code.
- ClashOfCode and Player classes.
- ClashOfCodeNotFound exception.
- Renamed
Client.codingamer()
to Client.get_codingamer.
- Client class.
Client.codingamer()
method to get a codingamer.- CodinGamer class.
- CodinGamerNotFound exception.