CFBSharp.Api.PlaysApi

September 2, 2022 ยท View on GitHub

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

MethodHTTP requestDescription
GetLivePlaysGET /live/playsLive metrics and PBP (Patreon only)
GetPlayStatTypesGET /play/stat/typesTypes of player play stats
GetPlayStatsGET /play/statsPlay stats by play
GetPlayTypesGET /play/typesPlay types
GetPlaysGET /playsPlay by play data

GetLivePlays

LivePlayByPlay GetLivePlays (int? id)

Live metrics and PBP (Patreon only)

Get live metrics and PBP

Example

using System;
using System.Diagnostics;
using CFBSharp.Api;
using CFBSharp.Client;
using CFBSharp.Model;

namespace Example
{
    public class GetLivePlaysExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new PlaysApi();
            var id = 56;  // int? | Game id

            try
            {
                // Live metrics and PBP (Patreon only)
                LivePlayByPlay result = apiInstance.GetLivePlays(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlaysApi.GetLivePlays: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
idint?Game id

Return type

LivePlayByPlay

Authorization

ApiKeyAuth

HTTP request headers

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

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

GetPlayStatTypes

ICollection GetPlayStatTypes ()

Types of player play stats

Type of play stats

Example

using System;
using System.Diagnostics;
using CFBSharp.Api;
using CFBSharp.Client;
using CFBSharp.Model;

namespace Example
{
    public class GetPlayStatTypesExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new PlaysApi();

            try
            {
                // Types of player play stats
                ICollection<PlayStatType> result = apiInstance.GetPlayStatTypes();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlaysApi.GetPlayStatTypes: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

ICollection

Authorization

ApiKeyAuth

HTTP request headers

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

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

GetPlayStats

ICollection GetPlayStats (int? year = null, int? week = null, string team = null, int? gameId = null, int? athleteId = null, int? statTypeId = null, string seasonType = null, string conference = null)

Play stats by play

Gets player stats associated by play (limit 1000)

Example

using System;
using System.Diagnostics;
using CFBSharp.Api;
using CFBSharp.Client;
using CFBSharp.Model;

namespace Example
{
    public class GetPlayStatsExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new PlaysApi();
            var year = 56;  // int? | Year filter (optional) 
            var week = 56;  // int? | Week filter (optional) 
            var team = team_example;  // string | Team filter (optional) 
            var gameId = 56;  // int? | gameId filter (from /games endpoint) (optional) 
            var athleteId = 56;  // int? | athleteId filter (from /roster endpoint) (optional) 
            var statTypeId = 56;  // int? | statTypeId filter (from /play/stat/types endpoint) (optional) 
            var seasonType = seasonType_example;  // string | regular, postseason, or both (optional) 
            var conference = conference_example;  // string | conference abbreviation filter (optional) 

            try
            {
                // Play stats by play
                ICollection<PlayStat> result = apiInstance.GetPlayStats(year, week, team, gameId, athleteId, statTypeId, seasonType, conference);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlaysApi.GetPlayStats: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year filter[optional]
weekint?Week filter[optional]
teamstringTeam filter[optional]
gameIdint?gameId filter (from /games endpoint)[optional]
athleteIdint?athleteId filter (from /roster endpoint)[optional]
statTypeIdint?statTypeId filter (from /play/stat/types endpoint)[optional]
seasonTypestringregular, postseason, or both[optional]
conferencestringconference abbreviation filter[optional]

Return type

ICollection

Authorization

ApiKeyAuth

HTTP request headers

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

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

GetPlayTypes

ICollection GetPlayTypes ()

Play types

Types of plays

Example

using System;
using System.Diagnostics;
using CFBSharp.Api;
using CFBSharp.Client;
using CFBSharp.Model;

namespace Example
{
    public class GetPlayTypesExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new PlaysApi();

            try
            {
                // Play types
                ICollection<PlayType> result = apiInstance.GetPlayTypes();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlaysApi.GetPlayTypes: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

ICollection

Authorization

ApiKeyAuth

HTTP request headers

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

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

GetPlays

ICollection GetPlays (int? year, int? week, string seasonType = null, string team = null, string offense = null, string defense = null, string conference = null, string offenseConference = null, string defenseConference = null, int? playType = null, string classification = null)

Play by play data

Get play data and results

Example

using System;
using System.Diagnostics;
using CFBSharp.Api;
using CFBSharp.Client;
using CFBSharp.Model;

namespace Example
{
    public class GetPlaysExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new PlaysApi();
            var year = 56;  // int? | Year filter
            var week = 56;  // int? | Week filter (required if team, offense, or defense, not specified)
            var seasonType = seasonType_example;  // string | Season type filter (optional)  (default to regular)
            var team = team_example;  // string | Team filter (optional) 
            var offense = offense_example;  // string | Offensive team filter (optional) 
            var defense = defense_example;  // string | Defensive team filter (optional) 
            var conference = conference_example;  // string | Conference filter (optional) 
            var offenseConference = offenseConference_example;  // string | Offensive conference filter (optional) 
            var defenseConference = defenseConference_example;  // string | Defensive conference filter (optional) 
            var playType = 56;  // int? | Play type filter (optional) 
            var classification = classification_example;  // string | Division classification filter (fbs/fcs/ii/iii) (optional) 

            try
            {
                // Play by play data
                ICollection<Play> result = apiInstance.GetPlays(year, week, seasonType, team, offense, defense, conference, offenseConference, defenseConference, playType, classification);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlaysApi.GetPlays: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year filter
weekint?Week filter (required if team, offense, or defense, not specified)
seasonTypestringSeason type filter[optional] [default to regular]
teamstringTeam filter[optional]
offensestringOffensive team filter[optional]
defensestringDefensive team filter[optional]
conferencestringConference filter[optional]
offenseConferencestringOffensive conference filter[optional]
defenseConferencestringDefensive conference filter[optional]
playTypeint?Play type filter[optional]
classificationstringDivision classification filter (fbs/fcs/ii/iii)[optional]

Return type

ICollection

Authorization

ApiKeyAuth

HTTP request headers

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

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