All URIs are relative to https://api.collegefootballdata.com
| Method | HTTP request | Description |
|---|---|---|
| get_usage | GET /info/usage | |
| get_user_info | GET /info |
UserUsage get_usage(days=days, limit=limit, api=api)
Returns recent usage for the authenticated user's shared CFB and CBB call
pool. Returns null when the request is not authenticated.
- Bearer Authentication (apiKey):
import time
import os
import cfbd
from cfbd.models.user_usage import UserUsage
from cfbd.models.user_usage_api import UserUsageApi
from cfbd.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.collegefootballdata.com
# See configuration.py for a list of all supported configuration parameters.
configuration = cfbd.Configuration(
host = "https://api.collegefootballdata.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 = cfbd.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cfbd.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cfbd.InfoApi(api_client)
days = 56 # int | Trailing days to include. Defaults to 7; maximum 31. (optional)
limit = 56 # int | Maximum endpoint and request rows to return. Defaults to 10; maximum 50. (optional)
api = cfbd.UserUsageApi() # UserUsageApi | API to include: `all`, `cfb`, or `cbb`. (optional)
try:
api_response = api_instance.get_usage(days=days, limit=limit, api=api)
print("The response of InfoApi->get_usage:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling InfoApi->get_usage: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| days | int | Trailing days to include. Defaults to 7; maximum 31. | [optional] |
| limit | int | Maximum endpoint and request rows to return. Defaults to 10; maximum 50. | [optional] |
| api | UserUsageApi | API to include: `all`, `cfb`, or `cbb`. | [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]
UserInfo get_user_info()
Returns the authenticated user's Patreon level and remaining API calls.
Returns null when the request is not authenticated.
- Bearer Authentication (apiKey):
import time
import os
import cfbd
from cfbd.models.user_info import UserInfo
from cfbd.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.collegefootballdata.com
# See configuration.py for a list of all supported configuration parameters.
configuration = cfbd.Configuration(
host = "https://api.collegefootballdata.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 = cfbd.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cfbd.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cfbd.InfoApi(api_client)
try:
api_response = api_instance.get_user_info()
print("The response of InfoApi->get_user_info:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling InfoApi->get_user_info: %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]