mirror of
https://github.com/DragonMinded/bemaniutils.git
synced 2026-10-09 15:19:54 +03:00
Initial commit of BEMANI Utilities to GitHub.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
from typing import List, Any, Dict
|
||||
|
||||
from bemani.api.exceptions import APIException
|
||||
from bemani.data import Data
|
||||
|
||||
|
||||
class BaseObject:
|
||||
"""
|
||||
A base class which represents a fetchable API object. Every fetchable object
|
||||
will subclass from this and implement one or more version fetches. These
|
||||
are dynamically looked up by the version number provided by the client, so
|
||||
objects can control which versions they reply to by subclassing or ignoring
|
||||
various fetch versions.
|
||||
"""
|
||||
|
||||
def __init__(self, data: Data, game: str, version: int, omnimix: bool) -> None:
|
||||
self.data = data
|
||||
self.game = game
|
||||
self.version = version
|
||||
self.omnimix = omnimix
|
||||
|
||||
def fetch_v1(self, idtype: str, ids: List[str], params: Dict[str, Any]) -> Any:
|
||||
raise APIException('Object fetch not supported for this version!')
|
||||
Reference in New Issue
Block a user