CFBSharp.Api.MetricsApi

December 9, 2023 ยท View on GitHub

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

MethodHTTP requestDescription
GetFGEPGET /metrics/fg/epField Goal Expected Points
GetGamePPAGET /ppa/gamesTeam Predicated Points Added (PPA/EPA) by game
GetPlayerGamePPAGET /ppa/players/gamesPlayer Predicated Points Added (PPA/EPA) broken down by game
GetPlayerSeasonPPAGET /ppa/players/seasonPlayer Predicated Points Added (PPA/EPA) broken down by season
GetPredictedPointsGET /ppa/predictedPredicted Points (i.e. Expected Points or EP)
GetPregameWinProbabilitiesGET /metrics/wp/pregamePregame win probability data
GetTeamPPAGET /ppa/teamsPredicted Points Added (PPA/EPA) data by team
GetWinProbabilityDataGET /metrics/wpWin probability chart data

GetFGEP

ICollection GetFGEP ()

Field Goal Expected Points

Field Goal Expected Poitns

Example

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

namespace Example
{
    public class GetFGEPExample
    {
        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 MetricsApi();

            try
            {
                // Field Goal Expected Points
                ICollection<FieldGoalExpectedPoints> result = apiInstance.GetFGEP();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MetricsApi.GetFGEP: " + 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]

GetGamePPA

ICollection GetGamePPA (int? year, int? week = null, string team = null, string conference = null, bool? excludeGarbageTime = null, string seasonType = null)

Team Predicated Points Added (PPA/EPA) by game

Predicted Points Added (PPA) by game

Example

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

namespace Example
{
    public class GetGamePPAExample
    {
        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 MetricsApi();
            var year = 56;  // int? | Year filter
            var week = 56;  // int? | Week filter (optional) 
            var team = team_example;  // string | Team filter (optional) 
            var conference = conference_example;  // string | Conference filter (optional) 
            var excludeGarbageTime = true;  // bool? | Filter to remove garbage time plays from calculations (optional) 
            var seasonType = seasonType_example;  // string | Season type filter (regular or postseason) (optional)  (default to regular)

            try
            {
                // Team Predicated Points Added (PPA/EPA) by game
                ICollection<GamePPA> result = apiInstance.GetGamePPA(year, week, team, conference, excludeGarbageTime, seasonType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MetricsApi.GetGamePPA: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year filter
weekint?Week filter[optional]
teamstringTeam filter[optional]
conferencestringConference filter[optional]
excludeGarbageTimebool?Filter to remove garbage time plays from calculations[optional]
seasonTypestringSeason type filter (regular or postseason)[optional] [default to regular]

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]

GetPlayerGamePPA

ICollection GetPlayerGamePPA (int? year = null, int? week = null, string team = null, string position = null, int? playerId = null, string threshold = null, bool? excludeGarbageTime = null, string seasonType = null)

Player Predicated Points Added (PPA/EPA) broken down by game

Predicted Points Added (PPA) by player game

Example

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

namespace Example
{
    public class GetPlayerGamePPAExample
    {
        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 MetricsApi();
            var year = 56;  // int? | Year filter (optional) 
            var week = 56;  // int? | Week filter (optional) 
            var team = team_example;  // string | Team filter (optional) 
            var position = position_example;  // string | Position abbreviation filter (optional) 
            var playerId = 56;  // int? | Player id filter (optional) 
            var threshold = threshold_example;  // string | Minimum play threshold filter (optional) 
            var excludeGarbageTime = true;  // bool? | Filter to remove garbage time plays from calculations (optional) 
            var seasonType = seasonType_example;  // string | Season type filter (regular or postseason) (optional)  (default to regular)

            try
            {
                // Player Predicated Points Added (PPA/EPA) broken down by game
                ICollection<PlayerGamePPA> result = apiInstance.GetPlayerGamePPA(year, week, team, position, playerId, threshold, excludeGarbageTime, seasonType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MetricsApi.GetPlayerGamePPA: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year filter[optional]
weekint?Week filter[optional]
teamstringTeam filter[optional]
positionstringPosition abbreviation filter[optional]
playerIdint?Player id filter[optional]
thresholdstringMinimum play threshold filter[optional]
excludeGarbageTimebool?Filter to remove garbage time plays from calculations[optional]
seasonTypestringSeason type filter (regular or postseason)[optional] [default to regular]

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]

GetPlayerSeasonPPA

ICollection GetPlayerSeasonPPA (int? year = null, string team = null, string conference = null, string position = null, int? playerId = null, string threshold = null, bool? excludeGarbageTime = null)

Player Predicated Points Added (PPA/EPA) broken down by season

Predicted Points Added (PPA) by player season

Example

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

namespace Example
{
    public class GetPlayerSeasonPPAExample
    {
        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 MetricsApi();
            var year = 56;  // int? | Year filter (optional) 
            var team = team_example;  // string | Team filter (optional) 
            var conference = conference_example;  // string | Conference abbreviation filter (optional) 
            var position = position_example;  // string | Position abbreviation filter (optional) 
            var playerId = 56;  // int? | Player id filter (optional) 
            var threshold = threshold_example;  // string | Minimum play threshold filter (optional) 
            var excludeGarbageTime = true;  // bool? | Filter to remove garbage time plays from calculations (optional) 

            try
            {
                // Player Predicated Points Added (PPA/EPA) broken down by season
                ICollection<PlayerSeasonPPA> result = apiInstance.GetPlayerSeasonPPA(year, team, conference, position, playerId, threshold, excludeGarbageTime);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MetricsApi.GetPlayerSeasonPPA: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year filter[optional]
teamstringTeam filter[optional]
conferencestringConference abbreviation filter[optional]
positionstringPosition abbreviation filter[optional]
playerIdint?Player id filter[optional]
thresholdstringMinimum play threshold filter[optional]
excludeGarbageTimebool?Filter to remove garbage time plays from calculations[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]

GetPredictedPoints

ICollection GetPredictedPoints (int? down, int? distance)

Predicted Points (i.e. Expected Points or EP)

Predicted Points

Example

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

namespace Example
{
    public class GetPredictedPointsExample
    {
        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 MetricsApi();
            var down = 56;  // int? | Down filter
            var distance = 56;  // int? | Distance filter

            try
            {
                // Predicted Points (i.e. Expected Points or EP)
                ICollection<PredictedPoints> result = apiInstance.GetPredictedPoints(down, distance);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MetricsApi.GetPredictedPoints: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
downint?Down filter
distanceint?Distance filter

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]

GetPregameWinProbabilities

ICollection GetPregameWinProbabilities (int? year = null, int? week = null, string team = null, string seasonType = null)

Pregame win probability data

Pregame win probabilities

Example

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

namespace Example
{
    public class GetPregameWinProbabilitiesExample
    {
        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 MetricsApi();
            var year = 56;  // int? | Year filter (optional) 
            var week = 56;  // int? | Week filter (optional) 
            var team = team_example;  // string | Team filter (optional) 
            var seasonType = seasonType_example;  // string | regular or postseason (optional) 

            try
            {
                // Pregame win probability data
                ICollection<PregameWP> result = apiInstance.GetPregameWinProbabilities(year, week, team, seasonType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MetricsApi.GetPregameWinProbabilities: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year filter[optional]
weekint?Week filter[optional]
teamstringTeam filter[optional]
seasonTypestringregular or postseason[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]

GetTeamPPA

ICollection GetTeamPPA (int? year = null, string team = null, string conference = null, bool? excludeGarbageTime = null)

Predicted Points Added (PPA/EPA) data by team

Predicted Points Added (PPA)

Example

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

namespace Example
{
    public class GetTeamPPAExample
    {
        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 MetricsApi();
            var year = 56;  // int? | Year filter (required if team not specified) (optional) 
            var team = team_example;  // string | Team filter (required if year not specified) (optional) 
            var conference = conference_example;  // string | Conference filter (optional) 
            var excludeGarbageTime = true;  // bool? | Filter to remove garbage time plays from calculations (optional) 

            try
            {
                // Predicted Points Added (PPA/EPA) data by team
                ICollection<TeamPPA> result = apiInstance.GetTeamPPA(year, team, conference, excludeGarbageTime);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MetricsApi.GetTeamPPA: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year filter (required if team not specified)[optional]
teamstringTeam filter (required if year not specified)[optional]
conferencestringConference filter[optional]
excludeGarbageTimebool?Filter to remove garbage time plays from calculations[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]

GetWinProbabilityData

ICollection GetWinProbabilityData (int? gameId)

Win probability chart data

Win probability data

Example

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

namespace Example
{
    public class GetWinProbabilityDataExample
    {
        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 MetricsApi();
            var gameId = 56;  // int? | Game id filter

            try
            {
                // Win probability chart data
                ICollection<PlayWP> result = apiInstance.GetWinProbabilityData(gameId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MetricsApi.GetWinProbabilityData: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
gameIdint?Game id filter

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]