-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutilfuncs.py
More file actions
30 lines (23 loc) · 898 Bytes
/
utilfuncs.py
File metadata and controls
30 lines (23 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
def getUniqueEvents(event_api, team_given):
eventList = event_api.get_team_events_by_year(team_given, 2023)
eventKeyList = []
for i in eventList:
eventKeyList.append(i.key)
return eventKeyList
def getUniqueTeams(team_api, eventList):
names_numbers = []
countries = []
states = []
cities = []
for event in eventList:
teams = team_api.get_event_teams(event)
for t in teams:
if not ([t.nickname, t.team_number] in names_numbers):
names_numbers.append([t.nickname, t.team_number])
if not (t.country in countries):
countries.append(t.country)
if not (t.state_prov in states):
states.append(t.state_prov)
if not (t.city in cities):
cities.append(t.city)
return [names_numbers, countries, states, cities ]