CFBSharp.Api.GamesApi

September 4, 2022 ยท View on GitHub

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

MethodHTTP requestDescription
GetAdvancedBoxScoreGET /game/box/advancedAdvanced box scores
GetCalendarGET /calendarSeason calendar
GetGameMediaGET /games/mediaGame media information and schedules
GetGameWeatherGET /games/weatherGame weather information (Patreon only)
GetGamesGET /gamesGames and results
GetPlayerGameStatsGET /games/playersPlayer game stats
GetScoreboardGET /scoreboardLive game results (Patreon only)
GetTeamGameStatsGET /games/teamsTeam game stats
GetTeamRecordsGET /recordsTeam records

GetAdvancedBoxScore

BoxScore GetAdvancedBoxScore (int? gameId)

Advanced box scores

Get advanced box score data

Example

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

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

            try
            {
                // Advanced box scores
                BoxScore result = apiInstance.GetAdvancedBoxScore(gameId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GamesApi.GetAdvancedBoxScore: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
gameIdint?Game id parameters

Return type

BoxScore

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]

GetCalendar

ICollection GetCalendar (int? year)

Season calendar

Get calendar of weeks by season

Example

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

namespace Example
{
    public class GetCalendarExample
    {
        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 GamesApi();
            var year = 56;  // int? | Year filter

            try
            {
                // Season calendar
                ICollection<Week> result = apiInstance.GetCalendar(year);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GamesApi.GetCalendar: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year 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]

GetGameMedia

ICollection GetGameMedia (int? year, int? week = null, string seasonType = null, string team = null, string conference = null, string mediaType = null, string classification = null)

Game media information and schedules

Game media information (TV, radio, etc)

Example

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

namespace Example
{
    public class GetGameMediaExample
    {
        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 GamesApi();
            var year = 56;  // int? | Year filter
            var week = 56;  // int? | Week filter (optional) 
            var seasonType = seasonType_example;  // string | Season type filter (regular, postseason, or both) (optional) 
            var team = team_example;  // string | Team filter (optional) 
            var conference = conference_example;  // string | Conference filter (optional) 
            var mediaType = mediaType_example;  // string | Media type filter (tv, radio, web, ppv, or mobile) (optional) 
            var classification = classification_example;  // string | Division classification filter (fbs/fcs/ii/iii) (optional) 

            try
            {
                // Game media information and schedules
                ICollection<GameMedia> result = apiInstance.GetGameMedia(year, week, seasonType, team, conference, mediaType, classification);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GamesApi.GetGameMedia: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year filter
weekint?Week filter[optional]
seasonTypestringSeason type filter (regular, postseason, or both)[optional]
teamstringTeam filter[optional]
conferencestringConference filter[optional]
mediaTypestringMedia type filter (tv, radio, web, ppv, or mobile)[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]

GetGameWeather

ICollection GetGameWeather (int? gameId = null, int? year = null, int? week = null, string seasonType = null, string team = null, string conference = null, string classification = null)

Game weather information (Patreon only)

Weather information for the hour of kickoff

Example

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

namespace Example
{
    public class GetGameWeatherExample
    {
        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 GamesApi();
            var gameId = 56;  // int? | Game id filter (required if no year) (optional) 
            var year = 56;  // int? | Year filter (required if no game id) (optional) 
            var week = 56;  // int? | Week filter (optional) 
            var seasonType = seasonType_example;  // string | Season type filter (regular, postseason, or both) (optional) 
            var team = team_example;  // string | Team filter (optional) 
            var conference = conference_example;  // string | Conference filter (optional) 
            var classification = classification_example;  // string | Division classification filter (fbs/fcs/ii/iii) (optional) 

            try
            {
                // Game weather information (Patreon only)
                ICollection<GameWeather> result = apiInstance.GetGameWeather(gameId, year, week, seasonType, team, conference, classification);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GamesApi.GetGameWeather: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
gameIdint?Game id filter (required if no year)[optional]
yearint?Year filter (required if no game id)[optional]
weekint?Week filter[optional]
seasonTypestringSeason type filter (regular, postseason, or both)[optional]
teamstringTeam filter[optional]
conferencestringConference 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]

GetGames

ICollection GetGames (int? year, int? week = null, string seasonType = null, string team = null, string home = null, string away = null, string conference = null, string division = null, int? id = null)

Games and results

Get game results

Example

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

namespace Example
{
    public class GetGamesExample
    {
        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 GamesApi();
            var year = 56;  // int? | Year/season filter for games
            var week = 56;  // int? | Week filter (optional) 
            var seasonType = seasonType_example;  // string | Season type filter (regular or postseason) (optional)  (default to regular)
            var team = team_example;  // string | Team (optional) 
            var home = home_example;  // string | Home team filter (optional) 
            var away = away_example;  // string | Away team filter (optional) 
            var conference = conference_example;  // string | Conference abbreviation filter (optional) 
            var division = division_example;  // string | Division classification filter (fbs/fcs/ii/iii) (optional) 
            var id = 56;  // int? | id filter for querying a single game (optional) 

            try
            {
                // Games and results
                ICollection<Game> result = apiInstance.GetGames(year, week, seasonType, team, home, away, conference, division, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GamesApi.GetGames: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year/season filter for games
weekint?Week filter[optional]
seasonTypestringSeason type filter (regular or postseason)[optional] [default to regular]
teamstringTeam[optional]
homestringHome team filter[optional]
awaystringAway team filter[optional]
conferencestringConference abbreviation filter[optional]
divisionstringDivision classification filter (fbs/fcs/ii/iii)[optional]
idint?id filter for querying a single game[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]

GetPlayerGameStats

ICollection GetPlayerGameStats (int? year, int? week = null, string seasonType = null, string team = null, string conference = null, string category = null, int? gameId = null)

Player game stats

Player stats broken down by game

Example

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

namespace Example
{
    public class GetPlayerGameStatsExample
    {
        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 GamesApi();
            var year = 56;  // int? | Year/season filter for games
            var week = 56;  // int? | Week filter (optional) 
            var seasonType = seasonType_example;  // string | Season type filter (regular or postseason) (optional)  (default to regular)
            var team = team_example;  // string | Team filter (optional) 
            var conference = conference_example;  // string | Conference abbreviation filter (optional) 
            var category = category_example;  // string | Category filter (e.g defensive) (optional) 
            var gameId = 56;  // int? | Game id filter (optional) 

            try
            {
                // Player game stats
                ICollection<PlayerGame> result = apiInstance.GetPlayerGameStats(year, week, seasonType, team, conference, category, gameId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GamesApi.GetPlayerGameStats: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year/season filter for games
weekint?Week filter[optional]
seasonTypestringSeason type filter (regular or postseason)[optional] [default to regular]
teamstringTeam filter[optional]
conferencestringConference abbreviation filter[optional]
categorystringCategory filter (e.g defensive)[optional]
gameIdint?Game id 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]

GetScoreboard

ICollection GetScoreboard (string classification = null, string conference = null)

Live game results (Patreon only)

Get live game results

Example

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

namespace Example
{
    public class GetScoreboardExample
    {
        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 GamesApi();
            var classification = classification_example;  // string | Classification filter (fbs, fcs, ii, or iii). Defaults to fbs. (optional) 
            var conference = conference_example;  // string | Conference abbreviation filter. (optional) 

            try
            {
                // Live game results (Patreon only)
                ICollection<ScoreboardGame> result = apiInstance.GetScoreboard(classification, conference);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GamesApi.GetScoreboard: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
classificationstringClassification filter (fbs, fcs, ii, or iii). Defaults to fbs.[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]

GetTeamGameStats

ICollection GetTeamGameStats (int? year, int? week = null, string seasonType = null, string team = null, string conference = null, int? gameId = null, string classification = null)

Team game stats

Team stats broken down by game

Example

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

namespace Example
{
    public class GetTeamGameStatsExample
    {
        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 GamesApi();
            var year = 56;  // int? | Year/season filter for games
            var week = 56;  // int? | Week filter (optional) 
            var seasonType = seasonType_example;  // string | Season type filter (regular or postseason) (optional)  (default to regular)
            var team = team_example;  // string | Team filter (optional) 
            var conference = conference_example;  // string | Conference abbreviation filter (optional) 
            var gameId = 56;  // int? | Game id filter (optional) 
            var classification = classification_example;  // string | Division classification filter (fbs/fcs/ii/iii) (optional) 

            try
            {
                // Team game stats
                ICollection<TeamGame> result = apiInstance.GetTeamGameStats(year, week, seasonType, team, conference, gameId, classification);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GamesApi.GetTeamGameStats: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year/season filter for games
weekint?Week filter[optional]
seasonTypestringSeason type filter (regular or postseason)[optional] [default to regular]
teamstringTeam filter[optional]
conferencestringConference abbreviation filter[optional]
gameIdint?Game id 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]

GetTeamRecords

ICollection GetTeamRecords (int? year = null, string team = null, string conference = null)

Team records

Get team records by year

Example

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

namespace Example
{
    public class GetTeamRecordsExample
    {
        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 GamesApi();
            var year = 56;  // int? | Year filter (optional) 
            var team = team_example;  // string | Team filter (optional) 
            var conference = conference_example;  // string | Conference filter (optional) 

            try
            {
                // Team records
                ICollection<TeamRecord> result = apiInstance.GetTeamRecords(year, team, conference);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GamesApi.GetTeamRecords: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year filter[optional]
teamstringTeam filter[optional]
conferencestringConference 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]