@@ -40,6 +40,24 @@ def __init__(self, config):
4040 self ._donors_to_display ) = self .config .get_cli_values ()
4141 donor_drive_participant .Participant .__init__ (self , self ._extralife_id , self ._text_folder , self ._currency_symbol ,
4242 self ._team_id , self ._donors_to_display , base_api_url )
43+ if self .team_id :
44+ self ._my_team = team .Team (self .team_id , self .text_folder , self .currency_symbol , self .donors_to_display ,
45+ self ._base_api_url )
46+
47+ def set_config_values (self ) -> None :
48+ """Set participant values, create URLs, and create Team."""
49+ # urls
50+ self ._participant_url = f"{ self ._base_api_url } /participants/{ self .donor_drive_id } "
51+ self ._donation_url = f"{ self .participant_url } /donations"
52+ self ._participant_donor_url = f"{ self .participant_url } /donors"
53+ self ._badge_url = f"{ self .participant_url } /badges"
54+ self ._milestone_url = f"{ self .participant_url } /milestones"
55+ self ._incentive_url = f"{ self .participant_url } /incentives"
56+ self ._activity_url = f"{ self .participant_url } /activity"
57+
58+ if self .team_id :
59+ self ._my_team = team .Team (self .team_id , self .text_folder , self .currency_symbol , self .donors_to_display ,
60+ self ._base_api_url )
4361
4462 def output_participant_data (self ) -> None : # pragma: no cover
4563 """Format participant data and write to text files for use by OBS or XSplit.
@@ -92,13 +110,15 @@ def output_milestone_data(self) -> None: # pragma: no cover
92110 }
93111 self .write_text_files (milestone_output )
94112
95- def output_incentive_data (self ) -> None : # pragma: no cover
113+ def output_incentive_data (self ) -> None : # pragma: no cover
96114 """Write out the incentive data to a text file."""
97115 if not self .incentives :
98116 return
99117 for incentive in self .incentives :
100118 incentive_folder = f"{ self .text_folder } incentives/{ incentive .incentive_id } "
101- incentive_dictionary = {"amount" : str (incentive .amount ), "description" : incentive .description , "quantity" : str (incentive .quantity ), "quantity_claimed" : str (incentive .quantity_claimed )}
119+ incentive_dictionary = {"amount" : str (incentive .amount ), "description" : incentive .description ,
120+ "quantity" : str (incentive .quantity ),
121+ "quantity_claimed" : str (incentive .quantity_claimed )}
102122
103123 extralife_io .write_text_files (incentive_dictionary , incentive_folder )
104124 if incentive .incentive_image_url :
0 commit comments