Census

This module handles calculations from PS2 Census API

async process_score(match: match.classes.MatchData, start_time: int, match_channel: TextChannel = None)

Calculate the result score for the MatchData object provided.

Parameters
  • match – MatchData object to fill with scores.

  • start_time – Round start timestamp: will process score starting form this time.

  • match_channel – Match channel for illegal weapons display (optional).

Raises

ApiNotReachable – If an API call fail.

async get_captures(match: match.classes.MatchData, start: int, end: int)

Find base captures for the MatchData object provided, between start and stop timestamps.

Parameters
  • match – MatchData object to fill with scores.

  • start – Round start timestamp.

  • end – Round end timestamp.

Raises

ApiNotReachable – If an API call fail.

async get_offline_players(team: classes.Team)list

Find all offline players for the team provided

Parameters

team – Team to investigate.

Returns

List of offline players

Raises

ApiNotReachable – If the API call fail.