Skip to content

Latest commit

 

History

History
590 lines (459 loc) · 20.1 KB

MetricsApi.md

File metadata and controls

590 lines (459 loc) · 20.1 KB

CFBSharp.Api.MetricsApi

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

Method HTTP request Description
GetFGEP GET /metrics/fg/ep Field Goal Expected Points
GetGamePPA GET /ppa/games Team Predicated Points Added (PPA/EPA) by game
GetPlayerGamePPA GET /ppa/players/games Player Predicated Points Added (PPA/EPA) broken down by game
GetPlayerSeasonPPA GET /ppa/players/season Player Predicated Points Added (PPA/EPA) broken down by season
GetPredictedPoints GET /ppa/predicted Predicted Points (i.e. Expected Points or EP)
GetPregameWinProbabilities GET /metrics/wp/pregame Pregame win probability data
GetTeamPPA GET /ppa/teams Predicted Points Added (PPA/EPA) data by team
GetWinProbabilityData GET /metrics/wp Win 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

Name Type Description Notes
year int? Year filter
week int? Week filter [optional]
team string Team filter [optional]
conference string Conference filter [optional]
excludeGarbageTime bool? Filter to remove garbage time plays from calculations [optional]
seasonType string Season 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

Name Type Description Notes
year int? Year filter [optional]
week int? Week filter [optional]
team string Team filter [optional]
position string Position abbreviation filter [optional]
playerId int? Player id filter [optional]
threshold string Minimum play threshold filter [optional]
excludeGarbageTime bool? Filter to remove garbage time plays from calculations [optional]
seasonType string Season 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

Name Type Description Notes
year int? Year filter [optional]
team string Team filter [optional]
conference string Conference abbreviation filter [optional]
position string Position abbreviation filter [optional]
playerId int? Player id filter [optional]
threshold string Minimum play threshold filter [optional]
excludeGarbageTime bool? 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

Name Type Description Notes
down int? Down filter
distance int? 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

Name Type Description Notes
year int? Year filter [optional]
week int? Week filter [optional]
team string Team filter [optional]
seasonType string regular 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

Name Type Description Notes
year int? Year filter (required if team not specified) [optional]
team string Team filter (required if year not specified) [optional]
conference string Conference filter [optional]
excludeGarbageTime bool? 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

Name Type Description Notes
gameId int? 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]