CFBSharp.Api.StatsApi

April 1, 2021 ยท View on GitHub

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

MethodHTTP requestDescription
GetAdvancedTeamGameStatsGET /stats/game/advancedAdvanced team metrics by game
GetAdvancedTeamSeasonStatsGET /stats/season/advancedAdvanced team metrics by season
GetStatCategoriesGET /stats/categoriesTeam stat categories
GetTeamSeasonStatsGET /stats/seasonTeam statistics by season

GetAdvancedTeamGameStats

ICollection GetAdvancedTeamGameStats (int? year = null, int? week = null, string team = null, string opponent = null, bool? excludeGarbageTime = null, string seasonType = null)

Advanced team metrics by game

Advanced team game stats

Example

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

namespace Example
{
    public class GetAdvancedTeamGameStatsExample
    {
        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 StatsApi();
            var year = 56;  // int? | Year filter (required if no team specified) (optional) 
            var week = 56;  // int? | Week filter (optional) 
            var team = team_example;  // string | Team filter (required if no year specified) (optional) 
            var opponent = opponent_example;  // string | Opponent filter (optional) 
            var excludeGarbageTime = true;  // bool? | Filter to remove garbage time plays from calculations (optional) 
            var seasonType = seasonType_example;  // string | Season type filter (regular, postseason, or both) (optional) 

            try
            {
                // Advanced team metrics by game
                ICollection<AdvancedGameStat> result = apiInstance.GetAdvancedTeamGameStats(year, week, team, opponent, excludeGarbageTime, seasonType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StatsApi.GetAdvancedTeamGameStats: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year filter (required if no team specified)[optional]
weekint?Week filter[optional]
teamstringTeam filter (required if no year specified)[optional]
opponentstringOpponent filter[optional]
excludeGarbageTimebool?Filter to remove garbage time plays from calculations[optional]
seasonTypestringSeason type filter (regular, postseason, or both)[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]

GetAdvancedTeamSeasonStats

ICollection GetAdvancedTeamSeasonStats (int? year = null, string team = null, bool? excludeGarbageTime = null, int? startWeek = null, int? endWeek = null)

Advanced team metrics by season

Advanced team season stats

Example

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

namespace Example
{
    public class GetAdvancedTeamSeasonStatsExample
    {
        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 StatsApi();
            var year = 56;  // int? | Year filter (required if no team specified) (optional) 
            var team = team_example;  // string | Team filter (required if no year specified) (optional) 
            var excludeGarbageTime = true;  // bool? | Filter to remove garbage time plays from calculations (optional) 
            var startWeek = 56;  // int? | Starting week filter (optional) 
            var endWeek = 56;  // int? | Starting week filter (optional) 

            try
            {
                // Advanced team metrics by season
                ICollection<AdvancedSeasonStat> result = apiInstance.GetAdvancedTeamSeasonStats(year, team, excludeGarbageTime, startWeek, endWeek);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StatsApi.GetAdvancedTeamSeasonStats: " + e.Message );
            }
        }
    }
}

Parameters

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

GetStatCategories

ICollection GetStatCategories ()

Team stat categories

Stat category list

Example

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

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

            try
            {
                // Team stat categories
                ICollection<string> result = apiInstance.GetStatCategories();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StatsApi.GetStatCategories: " + 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]

GetTeamSeasonStats

ICollection GetTeamSeasonStats (int? year = null, string team = null, string conference = null, int? startWeek = null, int? endWeek = null)

Team statistics by season

Team season stats

Example

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

namespace Example
{
    public class GetTeamSeasonStatsExample
    {
        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 StatsApi();
            var year = 56;  // int? | Year filter (required if no team specified) (optional) 
            var team = team_example;  // string | Team filter (required if no year specified) (optional) 
            var conference = conference_example;  // string | Conference abbreviation filter (optional) 
            var startWeek = 56;  // int? | Starting week filter (optional) 
            var endWeek = 56;  // int? | Starting week filter (optional) 

            try
            {
                // Team statistics by season
                ICollection<TeamSeasonStat> result = apiInstance.GetTeamSeasonStats(year, team, conference, startWeek, endWeek);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StatsApi.GetTeamSeasonStats: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year filter (required if no team specified)[optional]
teamstringTeam filter (required if no year specified)[optional]
conferencestringConference abbreviation filter[optional]
startWeekint?Starting week filter[optional]
endWeekint?Starting week 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]