masterblaster
Submodules
Package Contents
Classes
A MutableMapping is a generic container for associating |
|
A MutableMapping is a generic container for associating |
|
Attributes
- masterblaster.__title__ = 'masterblaster'
- masterblaster.__author__ = 'Øyvind Nohr'
- masterblaster.__license__ = 'MIT'
- masterblaster.__copyright__ = 'Copyright 2023 Øyvind Nohr'
- masterblaster.__version__ = '0.0.5'
- class masterblaster.Header[source]
Bases:
collections.abc.MutableMappingA MutableMapping is a generic container for associating key/value pairs.
This class provides concrete generic implementations of all methods except for __getitem__, __setitem__, __delitem__, __iter__, and __len__.
- add(name: str, value: str) Header[source]
Add a header field
- Parameters:
name (str) – The name of the header field
value (str) – The value of the header field
- Returns:
The header object
- Return type:
- class masterblaster.Member(player: dict, email: str, name: str, playerId: str, role: int, addedAt: str, invitedAt)[source]
- class masterblaster.Header[source]
Bases:
collections.abc.MutableMappingA MutableMapping is a generic container for associating key/value pairs.
This class provides concrete generic implementations of all methods except for __getitem__, __setitem__, __delitem__, __iter__, and __len__.
- add(name: str, value: str) Header[source]
Add a header field
- Parameters:
name (str) – The name of the header field
value (str) – The value of the header field
- Returns:
The header object
- Return type:
- masterblaster.BASE = 'https://app.masterblaster.gg/api'
- class masterblaster.MasterBlaster(access_token: Optional[str], org_name: str)[source]
- async __aenter__() MasterBlaster[source]
- async classmethod create(access_token: str, org_name: str) MasterBlaster[source]
Create a new MasterBlaster instance
- Parameters:
access_token (str) – The access token for the organization
org_name (str) – The name of the organization
- Returns:
A new MasterBlaster instance
- Return type:
- async _setup(org_name: str) MasterBlaster[source]
- async get_org(org_id: str) dict[str, str | dict][source]
Returns the organization for the given organization id
- Parameters:
(str) (org_id) –
- Returns:
Information about the organization
- Return type:
json
- async get_all_orgs() list[dict[str, Any]][source]
Returns all organizations related to the current token
- Parameters:
None –
- Returns:
Short information about all organizations related to current token
- Return type:
json
- async change_org(org_name: str) None[source]
Change the organization Will re-initialize the organization: id, members, and images
- Parameters:
org_name (str) – Name of the organization to change to
- Return type:
None
- async get_members() list[masterblaster.member.Member][source]
Returns all members of the organization
- Parameters:
None –
- Returns:
members – A list of all members in the organization
- Return type:
List[Member]
- async get_images() list[masterblaster.image.Image][source]
Returns images of the organization
- Parameters:
None –
- Returns:
images – A list of all images in the organization
- Return type:
list[Image]
- class masterblaster.Player(id: str, nickName: str, avatarUrl: str, registered: str, isProfileComplete: bool, gameAccounts: list[masterblaster.gameaccount.GameAccount])[source]
- class masterblaster.Member(player: dict, email: str, name: str, playerId: str, role: int, addedAt: str, invitedAt)[source]
- class masterblaster.GameAccount(id: str, nick: str, avatarUrl: str, gameId: str, isConnected: bool, connectedAt)[source]
- class masterblaster.GameAccount(id: str, nick: str, avatarUrl: str, gameId: str, isConnected: bool, connectedAt)[source]
- class masterblaster.Player(id: str, nickName: str, avatarUrl: str, registered: str, isProfileComplete: bool, gameAccounts: list[masterblaster.gameaccount.GameAccount])[source]