Skip to content

Latest commit

 

History

History
81 lines (55 loc) · 2.23 KB

File metadata and controls

81 lines (55 loc) · 2.23 KB

cfbd.InfoApi

All URIs are relative to https://api.collegefootballdata.com

Method HTTP request Description
get_user_info GET /info

get_user_info

UserInfo get_user_info()

Retrieves information about the user, including their Patreon level and remaining API calls.

Example

  • 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)

Parameters

This endpoint does not need any parameter.

Return type

UserInfo

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 UserInfo object containing patron level and remaining calls, or null if not authenticated. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]