Skip to content

Latest commit

 

History

History
681 lines (533 loc) · 23.3 KB

GamesApi.md

File metadata and controls

681 lines (533 loc) · 23.3 KB

CFBSharp.Api.GamesApi

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

Method HTTP request Description
GetAdvancedBoxScore GET /game/box/advanced Advanced box scores
GetCalendar GET /calendar Season calendar
GetGameMedia GET /games/media Game media information and schedules
GetGameWeather GET /games/weather Game weather information (Patreon only)
GetGames GET /games Games and results
GetPlayerGameStats GET /games/players Player game stats
GetScoreboard GET /scoreboard Live game results (Patreon only)
GetTeamGameStats GET /games/teams Team game stats
GetTeamRecords GET /records Team 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

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

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

Name Type Description Notes
year int? Year filter
week int? Week filter [optional]
seasonType string Season type filter (regular, postseason, or both) [optional]
team string Team filter [optional]
conference string Conference filter [optional]
mediaType string Media type filter (tv, radio, web, ppv, or mobile) [optional]
classification string Division 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

Name Type Description Notes
gameId int? Game id filter (required if no year) [optional]
year int? Year filter (required if no game id) [optional]
week int? Week filter [optional]
seasonType string Season type filter (regular, postseason, or both) [optional]
team string Team filter [optional]
conference string Conference filter [optional]
classification string Division 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

Name Type Description Notes
year int? Year/season filter for games
week int? Week filter [optional]
seasonType string Season type filter (regular or postseason) [optional] [default to regular]
team string Team [optional]
home string Home team filter [optional]
away string Away team filter [optional]
conference string Conference abbreviation filter [optional]
division string Division classification filter (fbs/fcs/ii/iii) [optional]
id int? 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

Name Type Description Notes
year int? Year/season filter for games
week int? Week filter [optional]
seasonType string Season type filter (regular or postseason) [optional] [default to regular]
team string Team filter [optional]
conference string Conference abbreviation filter [optional]
category string Category filter (e.g defensive) [optional]
gameId int? 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

Name Type Description Notes
classification string Classification filter (fbs, fcs, ii, or iii). Defaults to fbs. [optional]
conference string Conference 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

Name Type Description Notes
year int? Year/season filter for games
week int? Week filter [optional]
seasonType string Season type filter (regular or postseason) [optional] [default to regular]
team string Team filter [optional]
conference string Conference abbreviation filter [optional]
gameId int? Game id filter [optional]
classification string Division 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

Name Type Description Notes
year int? Year filter [optional]
team string Team filter [optional]
conference string Conference 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]