| import requests | |
| __api_key = {'X-TBA-App-Id': 'ex:ex:1'} | |
| __tba_url = 'https://www.thebluealliance.com/api/v2/' | |
| # team_number is type int | |
| def make_team(team_number): | |
| url = __tba_url + 'team/frc{0}'.format(team_number) | |
| req = requests.get(url, headers=__api_key) | |
| response = req.json() | |
| print(response) | |
| # or in a compact one-liner... | |
| def make_team2(team_number): | |
| print(requests.get(__tba_url + 'team/frc{0}'.format(team_number), headers=__api_key).json()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment