mirror of
https://github.com/cfultz/retroachievements-api-python.git
synced 2025-01-18 14:46:46 +01:00
added a few more calls for recent achievements, progresses, specific and range dates, and awards
This commit is contained in:
parent
6e24374224
commit
e25e3e85cb
@ -68,9 +68,9 @@ class RAClient:
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
def get_recent_achievements(self, user: str) -> list:
|
def get_recent_achievements(self, user: str) -> dict:
|
||||||
"""
|
"""
|
||||||
Get a user's most recent achievement
|
Get a user's most recent achievement within the last hour
|
||||||
|
|
||||||
Params:
|
Params:
|
||||||
u: Username to query
|
u: Username to query
|
||||||
@ -101,6 +101,37 @@ class RAClient:
|
|||||||
result = self._call_api("API_GetAchievementsEarnedOnDay.php?", {"u": user, "d": date}).json()
|
result = self._call_api("API_GetAchievementsEarnedOnDay.php?", {"u": user, "d": date}).json()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
def get_achievements_range(self, user: str, f: int, t: int) -> dict:
|
||||||
|
"""
|
||||||
|
Get a user's cheevos from a specific date
|
||||||
|
|
||||||
|
Params:
|
||||||
|
u: Username to query
|
||||||
|
f: From date to query (must be in epoch timestamp format)
|
||||||
|
t: To date to query (must be in epoch timestamp format)
|
||||||
|
"""
|
||||||
|
result = self._call_api("API_GetAchievementsEarnedOnDay.php?", {"u": user, "f": f, "t": t }).json()
|
||||||
|
return result
|
||||||
|
|
||||||
|
def get_all_completion_progress(self, user: str) -> dict:
|
||||||
|
"""
|
||||||
|
Get a user's info and progress on all games
|
||||||
|
|
||||||
|
Params:
|
||||||
|
u: Username to query
|
||||||
|
"""
|
||||||
|
result = self._call_api("API_GetUserCompletionProgress.php?", {"u": user}).json()
|
||||||
|
return result
|
||||||
|
|
||||||
|
def get_awards_badges(self, user: str) -> list:
|
||||||
|
"""
|
||||||
|
Get a user's awards and badges on RA
|
||||||
|
|
||||||
|
Params:
|
||||||
|
u: Username to query
|
||||||
|
"""
|
||||||
|
result = self._call_api("API_GetUserAwards.php?", {"u": user}).json()
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
# Game endpoints
|
# Game endpoints
|
||||||
|
Loading…
Reference in New Issue
Block a user