modernize python stack + add type safety#5
modernize python stack + add type safety#5amine4567 wants to merge 22 commits intoRetroAchievements:mainfrom
Conversation
retroachievements/client.py
Outdated
| raise ValueError( | ||
| "Invalid kind value. Must be 1 (completed), 2 (dropped) or 3 (expired)." | ||
| ) | ||
| result = self.call_api("API_GetInactiveClaims.php?", {"k": kind}).json() |
There was a problem hiding this comment.
Intellectual curiosity: what does this endpoint do?
There was a problem hiding this comment.
I can't find this endpoint in the official RA API documentation, not sure if it was removed at some point or I invented it ? Either way, removed in 862b849
|
|
||
| Params: | ||
| u: Username or ULID to query | ||
| i: ULID to query |
There was a problem hiding this comment.
Bug: This signature is wrong. i is the param for ticket ID.
There was a problem hiding this comment.
get_users_following_me and get_users_i_follow accept a user param, but PHP ignores this param.
retroachievements/client.py
Outdated
|
|
||
| def get_user_completion_progress( | ||
| self, user: str, count: int = 100, offset: int = 0 | ||
| ) -> GetUserCompletionProgressResponseEntity: |
There was a problem hiding this comment.
DX: Incorrect return type here.
|
|
||
| Params: | ||
| g: The game ID to query | ||
| t: Set to 0 for Latest Masters, 1 for High Scores, default = 0 |
There was a problem hiding this comment.
Docs: This may accidentally be flipped backwards.
There was a problem hiding this comment.
ULID is missing from nearly every response type that includes user data.
| Released: str | ||
| IsFinal: bool | ||
| ConsoleName: str | ||
| RichPresencePatch: str |
There was a problem hiding this comment.
I believe the Web API explicitly unsets this field.
| Publisher: str | ||
| Developer: str | ||
| Genre: str | ||
| Released: str |
There was a problem hiding this comment.
Missing ReleasedAtGranularity.
| NumDistinctPlayersHardcore: str | ||
|
|
||
|
|
||
| class GetGameExtendedResponse(GetGameExtendedResponseWithoutClaims): |
There was a problem hiding this comment.
Missing several fields from the Web API, probably worth double checking.
|
|
||
| def get_comments( | ||
| self, | ||
| game: int, |
There was a problem hiding this comment.
What about other comment types (achievements, user walls, etc)
Also when target is 3, int is the wrong type.
…get_console_ids' endpoint
…nt_game_awards' endpoint
pre-commithooksTypedDict