🐛 Moved Steam rate limiter init to runtime
This commit is contained in:
@@ -71,9 +71,13 @@ class SteamHelper:
|
|||||||
"""Helper around the Steam API"""
|
"""Helper around the Steam API"""
|
||||||
|
|
||||||
base_url = "https://store.steampowered.com/api"
|
base_url = "https://store.steampowered.com/api"
|
||||||
|
rate_limiter: SteamRateLimiter = None
|
||||||
|
|
||||||
# Shared across instances
|
def __init__(self) -> None:
|
||||||
rate_limiter: SteamRateLimiter = SteamRateLimiter()
|
# Instanciate the rate limiter on the class to share across instances
|
||||||
|
# Can't be done at class creation time, schema isn't available yet
|
||||||
|
if self.__class__.rate_limiter is None:
|
||||||
|
self.__class__.rate_limiter = SteamRateLimiter()
|
||||||
|
|
||||||
def get_manifest_data(self, manifest_path) -> SteamManifestData:
|
def get_manifest_data(self, manifest_path) -> SteamManifestData:
|
||||||
"""Get local data for a game from its manifest"""
|
"""Get local data for a game from its manifest"""
|
||||||
|
|||||||
Reference in New Issue
Block a user