All URIs are relative to https://api.collegebasketballdata.com
| Method | HTTP request | Description |
|---|---|---|
| get_draft_picks | GET /draft/picks | |
| get_draft_positions | GET /draft/positions | |
| get_draft_teams | GET /draft/teams |
List[DraftPick] get_draft_picks(year=year, draft_team=draft_team, source_team=source_team, position=position)
Returns historical NBA draft picks.
- Bearer Authentication (apiKey):
import time
import os
import cbbd
from cbbd.models.draft_pick import DraftPick
from cbbd.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.collegebasketballdata.com
# See configuration.py for a list of all supported configuration parameters.
configuration = cbbd.Configuration(
host = "https://api.collegebasketballdata.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: apiKey
configuration = cbbd.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cbbd.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cbbd.DraftApi(api_client)
year = 56 # int | Filters results to the specified draft year. (optional)
draft_team = 'draft_team_example' # str | Filters results to the specified NBA team. (optional)
source_team = 'source_team_example' # str | Filters results to the specified college team. (optional)
position = 'position_example' # str | Filters results to the specified player position abbreviation. (optional)
try:
api_response = api_instance.get_draft_picks(year=year, draft_team=draft_team, source_team=source_team, position=position)
print("The response of DraftApi->get_draft_picks:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DraftApi->get_draft_picks: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| year | int | Filters results to the specified draft year. | [optional] |
| draft_team | str | Filters results to the specified NBA team. | [optional] |
| source_team | str | Filters results to the specified college team. | [optional] |
| position | str | Filters results to the specified player position abbreviation. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[DraftPosition] get_draft_positions()
Returns player positions represented in the draft data.
- Bearer Authentication (apiKey):
import time
import os
import cbbd
from cbbd.models.draft_position import DraftPosition
from cbbd.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.collegebasketballdata.com
# See configuration.py for a list of all supported configuration parameters.
configuration = cbbd.Configuration(
host = "https://api.collegebasketballdata.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: apiKey
configuration = cbbd.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cbbd.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cbbd.DraftApi(api_client)
try:
api_response = api_instance.get_draft_positions()
print("The response of DraftApi->get_draft_positions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DraftApi->get_draft_positions: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[DraftTeam] get_draft_teams()
Returns NBA teams represented in the draft data.
- Bearer Authentication (apiKey):
import time
import os
import cbbd
from cbbd.models.draft_team import DraftTeam
from cbbd.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.collegebasketballdata.com
# See configuration.py for a list of all supported configuration parameters.
configuration = cbbd.Configuration(
host = "https://api.collegebasketballdata.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: apiKey
configuration = cbbd.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cbbd.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cbbd.DraftApi(api_client)
try:
api_response = api_instance.get_draft_teams()
print("The response of DraftApi->get_draft_teams:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DraftApi->get_draft_teams: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Ok | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]