Web API¶
boknows uses Flask to serve NCAA statistics as a basic Web API. The api connects
to the boknows.utils.get_ncaa_data()
function to return stats and store
data for rudimentary caching.
-
GET
/api/v1.0/
(string: sport_code)/
(string: div)/players/
(string: player_name)¶
-
GET
/api/v1.0/
(string: sport_code)/
(string: div)/
(string: academic_year)/players/
(string: player_name)¶ Returns latest data of specified player. Output is a JSON dictionary with ‘response’ as the key and a list of objects for each player as the value. Warning: many players have blanks in columns.
Parameters: - sport_code – NCAA code for desired sport. Ex: ‘MBB’ is Men’s Basketball
- div – NCAA division. Ex: ‘1’ for Division 1.
- academic_year – (Optional) Four digit academic year. Ex: ‘2015’ for 2014-2015. Defaults to ‘latest’.
- player_name – Player name with spaces removed.
-
GET
/api/v1.0/
(string: sport_code)/
(string: div)/teams/
(string: team_name)¶
-
GET
/api/v1.0/
(string: sport_code)/
(string: div)/
(string: academic_year)/teams/
(string: team_name)¶ Returns latest data of specified team. Output is a JSON dictionary with ‘response’ as the key and a list of objects for each team as the value.
Parameters: - sport_code – NCAA code for desired sport. Ex: ‘MBB’ is Men’s Basketball
- div – NCAA division. Ex: ‘1’ for Division 1.
- academic_year – (Optional) Four digit academic year. Ex: ‘2015’ for 2014-2015. Defaults to ‘latest’.
- team_name – NCAA school name with spaces removed.
-
GET
/api/v1.0/
(string: sport_code)/
(string: div)/players
¶
-
GET
/api/v1.0/
(string: sport_code)/
(string: div)/
(string: academic_year)/players
¶ Returns latest data of all players. Output is a JSON dictionary with ‘response’ as the key and a list of objects for each player as the value. Warning: many players have blanks in columns.
Parameters: - sport_code – NCAA code for desired sport. Ex: ‘MBB’ is Men’s Basketball
- div – NCAA division. Ex: ‘1’ for Division 1.
- academic_year – (Optional) Four digit academic year. Ex: ‘2015’ for 2014-2015. Defaults to ‘latest’.
-
GET
/api/v1.0/
(string: sport_code)/
(string: div)/teams
¶
-
GET
/api/v1.0/
(string: sport_code)/
(string: div)/
(string: academic_year)/teams
¶ Returns latest data of all teams. Output is a JSON dictionary with ‘response’ as the key and a list of objects for each team as the value.
Parameters: - sport_code – NCAA code for desired sport. Ex: ‘MBB’ is Men’s Basketball
- div – NCAA division. Ex: ‘1’ for Division 1.
- academic_year – (Optional) Four digit academic year. Ex: ‘2015’ for 2014-2015. Defaults to ‘latest’.