team

Contains classes pertaining to teams.

class eldonationtracker.team.Team(team_id: str, output_folder: str, currency_symbol: str, donors_to_display: str)

Bases: object

Hold Team API Data.

Parameters
  • self.team_id – The team’s ID in the API

  • self.team_url – URL to the team JSON API

  • self.team_participant_url – URL to the JSON api for participants in the team.

  • self.team_donation_url – URL to the JSON api for donations to the team

  • self.output_folder – The folder for the output text files

  • currency_symbol – for formatting text

  • self.team_info – a dictionary to values for output to text files

  • self.participant_calculation_dict – dictionary holding output for txt files

  • self.top_5_participant_list – a list of the top 5 team participants by amount donated.

  • self.team_json – A dictionary to hold JSON info from the API

  • self.team_goal – the fundraising goal of the team.

  • self.team_captain – The name of the team captain.

  • self.total_raised – The total amount raised by the team.

  • self.num_donations – The total amount of donations to the team.

  • self.top_5_participant_list – The top 5 participants in the team

  • self.participant_list – a list of the most recent participants

donation_run() → None

Get and calculate donation information.

participant_run() → None

Get and calculate team participant info.

team_api_info() → None

Get team info from API.

team_run() → None

A public method to update and output team and team participant info.

write_text_files(dictionary: dict) → None

Write info to text files.

Parameters

dictionary – The dictionary containing the values to write out to text files.