add req_team_info

This commit is contained in:
jlevine18 2019-03-22 14:54:55 -05:00 committed by GitHub
parent 6dbdfe00fc
commit 14a0414265
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,12 @@ __all__ = [
import requests import requests
#as this code is public, i'm not putting 2022's API key in here. just add it as a var in your script and go #as this code is public, i'm not putting 2022's API key in here. just add it as a var in your script and go
#requests basic team info
def req_team_info(team,apikey):
headers={'X-TBA-Auth-Key':apikey}
r=requests.get('https://www.thebluealliance.com/api/v3/team/frc'+str(team)+'/simple/',headers=headers)
return r
#requests a list of events that a team went to #requests a list of events that a team went to
def req_team_events(team,year,apikey): def req_team_events(team,year,apikey):
headers={'X-TBA-Auth-Key':apikey} headers={'X-TBA-Auth-Key':apikey}