How to use the eldonationtracker.extralife_IO.get_JSON function in eldonationtracker

To help you get started, we’ve selected a few eldonationtracker examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github djotaku / ELDonationTracker / eldonationtracker / team.py View on Github external
def get_participants(self):
        """Get team participant info from API."""
        self.participant_list = []
        self.team_participant_json = extralife_IO.get_JSON(self.team_participant_url)
        if self.team_participant_json == 0:
            print("couldn't get to URL")
        elif len(self.team_participant_json) == 0:
            print("No team participants!")
        else:
            self.participant_list = [TeamParticipant(self.team_participant_json[participant]) for participant in range(0, len(self.team_participant_json))]