includeRaw (bool): Whether or not to include the raw data as sent from the service. If you don't need this data, turn this off; it's only the default for compatibility.
"""
@classmethod
# cache has a max of 128 items; items are cached for 600 seconds (10min)
# important settings:
@@ -78,28 +74,35 @@ class Service(JSONDataclass):
# might add this to config.py later
@cachetools.func.ttl_cache
defrun(cls,id:str,includeRaw=True):
returncls.Run(id,includeRaw)
"""
Runs cls.run(...) but it's async.
Retrieves the data from the service.
Arguments:
id (str): The video ID.
includeRaw (bool): Whether or not to include the raw data as sent from the service. If you don't need this data, turn this off; it's only the default for compatibility.
"""
returncls.__run(id,includeRaw)
@classmethod
asyncdefrunAsync(cls,id,includeRaw=True):
"""
Runs cls.run(...) but it's async.
This currently still uses blocking networking (requests)!