rankade.Rankade

Module Contents

Classes

Rankade

Main wrapper around the Rankade Api. Use this class along with it’s methods to access the Api.

API

class Rankade(key_or_token: str, secret: Optional[str] = None, base_url: Optional[str] = None, session: Optional[ClientSession] = None)[source]

Bases: object

Main wrapper around the Rankade Api. Use this class along with it’s methods to access the Api.

Initialization

async get_games() rankade.models.Games[source]

Returns the list of the group’s games (i.e. games with at least one match played within the group).

Not implemented on server, is in API documentation, but requests return an error.

Raises:

NotImplementedError

Searches games by name.

Parameters:

name – Name of game to be searched for

async new_game_with_bggId(bggId: int) rankade.models.Game[source]
async new_game_with_name(name: str) rankade.models.Game[source]
async _new_game_with(params: rankade.api.Api.PARAMS) rankade.models.Game[source]
async save_match(match: rankade.models.NewMatch, dry_run: bool = False) rankade.models.NewMatchResponse[source]

To save a match pass in the following parameters:

Params models.NewMatch match:

Completed new match model.

Params bool dry_run:

For testing, allows for debugging without actually saving the match or using any of the groups Quota.

async get_match_status() rankade.models.MatchStatus[source]

Get the status of matches posted by the API.

async get_all_matches() rankade.models.Matches[source]

Get all Matches from the group.

async get_match_with_id(id: str) Optional[rankade.models.Match][source]

Get a match from the group with an Id matching the parameter.

Parameters:

id (str) – Match Id to find.

async get_matches_with_players(player_ids: MutableSequence[str]) Optional[rankade.models.Matches][source]

Get Matches player by players matching Id’s matching the parameter.

Param:

MutableSequence[str] player_ids: Id’s of players to find matches they’ve player.

async get_match_number(number: int) Optional[rankade.models.Match][source]

Get match by number matching parameter.

Parameters:

number (int) – Match number to find.

async get_all_players() rankade.models.Players[source]

Get a list of all the players in the group.

async new_ghost_player(name: str) rankade.models.Player[source]

Make a new ghost player to add to the group. There is a limit on Ghost users see Quotas and Limits.

async get_quota() rankade.models.Quota[source]

Returns current quota usage percentage

async get_rankings(subset_id: Optional[str] = None, match_number: Optional[int] = None) rankade.models.Rankings[source]

Retrieve group’s ranking for selected subset after the selected match number.

Parameters:
  • subset_id – Id of the subset to be used.

  • match_number – Retrieve subset results starting at match number provided.

async get_subset_with_id(id: str) Optional[rankade.models.Subset][source]

Return a specific subset using it’s Id.

async get_subsets() rankade.models.Subsets[source]

Return a list of all of a groups subsets.