companion.favourite.
favourite_add
(add, cfg, file)¶Adds player ID to the favourites in the config file.
Parameters: |
|
---|
companion.favourite.
favourite_remove
(remove, cfg, file)¶Removes player ID from the favourites in the config file.
Parameters: |
|
---|
companion.helpers.
MutuallyExclusiveOption
(*args, **kwargs)¶handle_parse_result
(ctx, opts, args)¶companion.helpers.
filter_by_multiple_keys
(f, array)¶Base function used for the filtering.
Parameters: |
|
---|---|
Returns: | Filtered array. |
companion.helpers.
filter_eq
(keys, value, array)¶Filters array of dicts by equality of given value with one of the define keys.
Parameters: |
|
---|---|
Returns: | Filtered array of dicts. |
companion.helpers.
filter_substr
(keys, value, array)¶Filters array of dicts by finding substring under one of the given keys.
Parameters: |
|
---|---|
Returns: | Filtered array of dicts. |
companion.helpers.
get_response_json
(endpoint, session=<requests.sessions.Session object>)¶Sends request to the API.
Parameters: |
|
---|---|
Returns: | JSON object with response. |
companion.heroes.
endpoint
(name, best, meta, counter)¶Defines endpoint to use based on parameters.
Parameters: |
|
---|---|
Returns: | Endpoint string. |
companion.heroes.
primary
(attr)¶Returns attribute name based on shortcut.
Parameters: | attr – Attribute shortcut. |
---|---|
Returns: | Attribute name. |
companion.heroes.
print_heroes_best
(data)¶Prints best heroes data.
Parameters: | data – Data to be printed. |
---|
companion.heroes.
print_heroes_counter
(data, id_)¶Prints counter heroes data.
Parameters: |
|
---|
companion.heroes.
print_heroes_meta
(data)¶Prints meta heroes data.
Parameters: | data – Data to be printed. |
---|
companion.heroes.
print_heroes_stats
(data, name)¶Prints heroes data.
Parameters: |
|
---|
companion.heroes.
process_heroes
(data, name, best, meta, counter, id_)¶Processes data based on given parameters and prints data to stdout.
Parameters: |
|
---|
companion.match.
Match
(data, type)¶Match entity holding important data for the match.
match_players_str
(radiant)¶Players of the match string representation.
matches_id
()¶Exact match string representation.
matches_live
()¶Live matches string representation.
matches_recent
()¶Recent matches string representation.
companion.matches.
endpoint
(id_, live)¶Defines endpoint by given parameters.
Parameters: |
|
---|---|
Returns: | Endpoint string. |
companion.matches.
process_matches
(type, data, team=None, league=None)¶Processes matches data by given parameters and prints to stdout.
Parameters: |
|
---|
companion.matches.
validate_teams
(ctx, param, value)¶Validates given team parameters.
Parameters: | value – Value to be validated. |
---|
companion.mmr.
print_mmr
(data)¶Prints MMR data to stdout.
Parameters: | data – Data to be printed. |
---|
companion.mmr.
print_mmr_country
(data, country)¶Prints MMR country data to stdout.
Parameters: |
|
---|
companion.mmr.
print_mmr_rank
(data)¶Prints MMR ranks data to stdout.
Parameters: | data – Data to be printed. |
---|
companion.mmr.
process_mmr
(data, ranks, country)¶Processes MMR data and prints to stdout.
Parameters: |
|
---|
companion.player_friend.
PlayerFriend
(data)¶Entity holding important data for player’s best friends data.
companion.players.
best_heroes
(id_)¶Prints player’s best heroes representation to stdout.
Parameters: | id – Player ID. |
---|
companion.players.
load_player
(id_)¶Loads player’s data from remote.
Parameters: | id – Player ID. |
---|---|
Returns: | Player entity. |
companion.players.
player_id_is_ok
(id_)¶Checks if given player ID is valid.
Parameters: | id – Player ID to be checked. |
---|---|
Returns: | Boolean whether the ID is valid. |
companion.players.
players_favourite
(favourites)¶Prints player’s favourites players data to stdout.
Parameters: | favourites – Dict of favourites. |
---|
companion.players.
players_heroes
(id_)¶Gets player’s heroes data.
Parameters: | id – Player ID. |
---|---|
Returns: | JSON with player’s heroes data. |
companion.players.
players_id
(id_)¶Prints player’s data to stdout.
Parameters: | id – Player ID. |
---|
companion.players.
print_players
(data)¶Prints player’s data to stdout.
Parameters: | data – Data to be printed. |
---|
companion.players.
process_players
(data, country, team, name)¶Processes player’s data by given parameters and prints to stdout.
Parameters: |
|
---|