We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
cfbd-python/cfbd/api/betting_api.py
Line 113 in 2c13cc7
I hit this while testing the get_sp_ratings function where I set the team to None and the full rankings were not returned.
Ex. def get_sp_rankings(year, team=None): 18 # create an instance of the API class 19 api_instance = cfbd.RatingsApi(cfbd.ApiClient(configuration)) 20 21 sp_rankings = {} 22 try: 23 # Historical SP+ ratings 24 api_response = api_instance.get_sp_ratings(year=year, team=team) 25 #print(api_response) 26 #pprint(api_responsei) 27 for team in api_response[:-1]: 28 #print(team) 29 #print(team.team, team.ranking) 30 team_name = normalize_team_names(team.team) 31 sp_rankings[team_name] = str(int(team.ranking)) 32 33 except ApiException as e: 34 print("Exception when calling RatingsApi->get_sp_ratings: %s\n" % e) 35 36 return sp_rankings ... if name == "main": 76 y2018 = get_sp_rankings(2018) 77 print(y2018)
Output: $ python3 cfbd_util.py {}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
cfbd-python/cfbd/api/betting_api.py
Line 113 in 2c13cc7
I hit this while testing the get_sp_ratings function where I set the team to None and the full rankings were not returned.
Ex.
def get_sp_rankings(year, team=None):
18 # create an instance of the API class
19 api_instance = cfbd.RatingsApi(cfbd.ApiClient(configuration))
20
21 sp_rankings = {}
22 try:
23 # Historical SP+ ratings
24 api_response = api_instance.get_sp_ratings(year=year, team=team)
25 #print(api_response)
26 #pprint(api_responsei)
27 for team in api_response[:-1]:
28 #print(team)
29 #print(team.team, team.ranking)
30 team_name = normalize_team_names(team.team)
31 sp_rankings[team_name] = str(int(team.ranking))
32
33 except ApiException as e:
34 print("Exception when calling RatingsApi->get_sp_ratings: %s\n" % e)
35
36 return sp_rankings
...
if name == "main":
76 y2018 = get_sp_rankings(2018)
77 print(y2018)
Output:
$ python3 cfbd_util.py
{}
The text was updated successfully, but these errors were encountered: