How to use the eldonationtracker.team.Team 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 / participant.py View on Github external
# donation information
        self.donation_list: list = []
        self.donation_formatted_output: dict = {'LastDonationNameAmnt': "No Donations Yet",
                                                'lastNDonationNameAmts': "No Donations Yet",
                                                'lastNDonationNameAmtsMessage': "No Donations Yet",
                                                'lastNDonationNameAmtsMessageHorizontal': "No Donations Yet",
                                                'lastNDonationNameAmtsHorizontal': "No Donations Yet"}
        # donor information
        self.top_donor = None
        self.donor_formatted_output: dict = {'TopDonorNameAmnt': "No Donors Yet"}

        # misc
        self.first_run: bool = True
        self.new_donation = False
        self.my_team = team.Team(self.team_id, self.text_folder, self.currency_symbol, self.donors_to_display)
github djotaku / ELDonationTracker / eldonationtracker / team.py View on Github external
name = json.get('displayName')
        else:
            name = "Anonymous"
        amount = float(json.get("sumDonations"))
        number_of_donations = json.get('numDonations')
        image_url = json.get('avatarImageURL')
        return name, amount, number_of_donations, image_url

    def __str__(self):
        return f"A Team Participant named {self.name} who has donated ${self.amount:.2f} to the team over {self.number_of_donations} donations."


if __name__ == "__main__":
    # debug next line
    folder = "/home/ermesa/Programming Projects/python/extralife/testOutput"
    myteam = Team(44013, folder, "$")
    myteam.get_team_json()
    myteam.get_participants()
    myteam._participant_calculations()
    myteam.write_text_files(myteam.team_info)
    myteam.write_text_files(myteam.participant_calculation_dict)