Skip to content

A python client SDK for sportsdata.io generated with Swagger.

Notifications You must be signed in to change notification settings

contrivancecompanychicago/GRAsportsdata

 
 

Repository files navigation

sportsdata

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 1.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import sportsdata.wnba_scores 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import sportsdata.wnba_scores

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import sportsdata.wnba_scores
from sportsdata.wnba_scores.rest import ApiException
from pprint import pprint

# Configure API key authorization: apiKeyHeader
configuration = sportsdata.wnba_scores.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: apiKeyQuery
configuration = sportsdata.wnba_scores.Configuration()
configuration.api_key['subscription-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['subscription-key'] = 'Bearer'

# create an instance of the API class
api_instance = sportsdata.wnba_scores.DefaultApi(sportsdata.wnba_scores.ApiClient(configuration))
format = 'format_example' # str | Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>.

try:
    # Are Games In Progress
    api_response = api_instance.are_games_in_progress(format)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->are_games_in_progress: %s\n" % e)

# Configure API key authorization: apiKeyHeader
configuration = sportsdata.wnba_scores.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: apiKeyQuery
configuration = sportsdata.wnba_scores.Configuration()
configuration.api_key['subscription-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['subscription-key'] = 'Bearer'

# create an instance of the API class
api_instance = sportsdata.wnba_scores.DefaultApi(sportsdata.wnba_scores.ApiClient(configuration))
format = 'format_example' # str | Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>.

try:
    # Current Season
    api_response = api_instance.current_season(format)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->current_season: %s\n" % e)

# Configure API key authorization: apiKeyHeader
configuration = sportsdata.wnba_scores.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: apiKeyQuery
configuration = sportsdata.wnba_scores.Configuration()
configuration.api_key['subscription-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['subscription-key'] = 'Bearer'

# create an instance of the API class
api_instance = sportsdata.wnba_scores.DefaultApi(sportsdata.wnba_scores.ApiClient(configuration))
format = 'format_example' # str | Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>.
_date = '_date_example' # str | The date of the game(s).<br>Examples: <code>2019-MAY-16</code>, <code>2019-MAY-25</code>, etc.

try:
    # Games by Date
    api_response = api_instance.games_by_date(format, _date)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->games_by_date: %s\n" % e)

# Configure API key authorization: apiKeyHeader
configuration = sportsdata.wnba_scores.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: apiKeyQuery
configuration = sportsdata.wnba_scores.Configuration()
configuration.api_key['subscription-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['subscription-key'] = 'Bearer'

# create an instance of the API class
api_instance = sportsdata.wnba_scores.DefaultApi(sportsdata.wnba_scores.ApiClient(configuration))
format = 'format_example' # str | Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>.
season = 'season_example' # str | Year of the season (with optional season type).<br>Examples: <code>2019</code>, <code>2019PRE</code>, <code>2019POST</code>, <code>2019REG</code>, etc.

try:
    # Schedule
    api_response = api_instance.schedule(format, season)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->schedule: %s\n" % e)

# Configure API key authorization: apiKeyHeader
configuration = sportsdata.wnba_scores.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: apiKeyQuery
configuration = sportsdata.wnba_scores.Configuration()
configuration.api_key['subscription-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['subscription-key'] = 'Bearer'

# create an instance of the API class
api_instance = sportsdata.wnba_scores.DefaultApi(sportsdata.wnba_scores.ApiClient(configuration))
format = 'format_example' # str | Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>.

try:
    # Stadiums
    api_response = api_instance.stadiums(format)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->stadiums: %s\n" % e)

# Configure API key authorization: apiKeyHeader
configuration = sportsdata.wnba_scores.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: apiKeyQuery
configuration = sportsdata.wnba_scores.Configuration()
configuration.api_key['subscription-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['subscription-key'] = 'Bearer'

# create an instance of the API class
api_instance = sportsdata.wnba_scores.DefaultApi(sportsdata.wnba_scores.ApiClient(configuration))
format = 'format_example' # str | Desired response format. Valid entries are <code>XML</code> or <code>JSON</code>.

try:
    # Teams
    api_response = api_instance.teams(format)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->teams: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.sportsdata.io/v3/wnba/scores

Class Method HTTP request Description
DefaultApi are_games_in_progress GET /{format}/AreAnyGamesInProgress Are Games In Progress
DefaultApi current_season GET /{format}/CurrentSeason Current Season
DefaultApi games_by_date GET /{format}/GamesByDate/{date} Games by Date
DefaultApi schedule GET /{format}/Games/{Season} Schedule
DefaultApi stadiums GET /{format}/Stadiums Stadiums
DefaultApi teams GET /{format}/Teams Teams

Documentation For Models

Documentation For Authorization

apiKeyHeader

  • Type: API key
  • API key parameter name: Ocp-Apim-Subscription-Key
  • Location: HTTP header

apiKeyQuery

  • Type: API key
  • API key parameter name: subscription-key
  • Location: URL query string

Author

About

A python client SDK for sportsdata.io generated with Swagger.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%