Skip to content

Latest commit

 

History

History
298 lines (231 loc) · 10.3 KB

StatsApi.md

File metadata and controls

298 lines (231 loc) · 10.3 KB

CFBSharp.Api.StatsApi

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

Method HTTP request Description
GetAdvancedTeamGameStats GET /stats/game/advanced Advanced team metrics by game
GetAdvancedTeamSeasonStats GET /stats/season/advanced Advanced team metrics by season
GetStatCategories GET /stats/categories Team stat categories
GetTeamSeasonStats GET /stats/season Team 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

Name Type Description Notes
year int? Year filter (required if no team specified) [optional]
week int? Week filter [optional]
team string Team filter (required if no year specified) [optional]
opponent string Opponent filter [optional]
excludeGarbageTime bool? Filter to remove garbage time plays from calculations [optional]
seasonType string Season 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

Name Type Description Notes
year int? Year filter (required if no team specified) [optional]
team string Team filter (required if no year specified) [optional]
excludeGarbageTime bool? Filter to remove garbage time plays from calculations [optional]
startWeek int? Starting week filter [optional]
endWeek int? 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

Name Type Description Notes
year int? Year filter (required if no team specified) [optional]
team string Team filter (required if no year specified) [optional]
conference string Conference abbreviation filter [optional]
startWeek int? Starting week filter [optional]
endWeek int? 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]