Skip to content

CFBD/cfbd-net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CollegeFootballData - the C# library for the College Football Data API

This is an API for query various college football datasets and analytics. API keys can be acquired from the CollegeFootballData.com website.

This C# SDK is automatically generated by the OpenAPI Generator project:

  • API version: 5.6.3
  • SDK version: 5.6.3
  • Generator version: 7.11.0
  • Build package: org.openapitools.codegen.languages.CSharpClientCodegen

Frameworks supported

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742. NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See RestSharp#1406.

Install via the dotnet CLI:

dotnet add package CollegeFootballData

Getting Started

using System.Collections.Generic;
using System.Diagnostics;
using CollegeFootballData.Api;
using CollegeFootballData.Client;
using CollegeFootballData.Model;

namespace Example
{
    public class Example
    {
        public static void Main()
        {

            Configuration config = new Configuration();
            config.BasePath = "https://apinext.collegefootballdata.com";
            // Configure Bearer token for authorization: apiKey
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new AdjustedMetricsApi(config);
            var year = 56;  // int? | Optional year filter (optional) 
            var team = "team_example";  // string? | Optional team filter (optional) 
            var conference = "conference_example";  // string? | Optional conference abbreviation filter (optional) 
            var position = "position_example";  // string? | Optional position abbreviation filter (optional) 

            try
            {
                List<PlayerWeightedEPA> result = apiInstance.GetAdjustedPlayerPassingStats(year, team, conference, position);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling AdjustedMetricsApi.GetAdjustedPlayerPassingStats: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }

        }
    }
}

Documentation for API Endpoints

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

Class Method HTTP request Description
AdjustedMetricsApi GetAdjustedPlayerPassingStats GET /wepa/players/passing
AdjustedMetricsApi GetAdjustedPlayerRushingStats GET /wepa/players/rushing
AdjustedMetricsApi GetAdjustedTeamSeasonStats GET /wepa/team/season
AdjustedMetricsApi GetKickerPaar GET /wepa/players/kicking
BettingApi GetLines GET /lines
CoachesApi GetCoaches GET /coaches
ConferencesApi GetConferences GET /conferences
DraftApi GetDraftPicks GET /draft/picks
DraftApi GetDraftPositions GET /draft/positions
DraftApi GetDraftTeams GET /draft/teams
DrivesApi GetDrives GET /drives
GamesApi GetAdvancedBoxScore GET /game/box/advanced
GamesApi GetCalendar GET /calendar
GamesApi GetGamePlayerStats GET /games/players
GamesApi GetGameTeamStats GET /games/teams
GamesApi GetGames GET /games
GamesApi GetMedia GET /games/media
GamesApi GetRecords GET /records
GamesApi GetScoreboard GET /scoreboard
GamesApi GetWeather GET /games/weather
MetricsApi GetFieldGoalExpectedPoints GET /metrics/fg/ep
MetricsApi GetPredictedPoints GET /ppa/predicted
MetricsApi GetPredictedPointsAddedByGame GET /ppa/games
MetricsApi GetPredictedPointsAddedByPlayerGame GET /ppa/players/games
MetricsApi GetPredictedPointsAddedByPlayerSeason GET /ppa/players/season
MetricsApi GetPredictedPointsAddedByTeam GET /ppa/teams
MetricsApi GetPregameWinProbabilities GET /metrics/wp/pregame
MetricsApi GetWinProbability GET /metrics/wp
PlayersApi GetPlayerUsage GET /player/usage
PlayersApi GetReturningProduction GET /player/returning
PlayersApi GetTransferPortal GET /player/portal
PlayersApi SearchPlayers GET /player/search
PlaysApi GetLivePlays GET /live/plays
PlaysApi GetPlayStatTypes GET /plays/stats/types
PlaysApi GetPlayStats GET /plays/stats
PlaysApi GetPlayTypes GET /plays/types
PlaysApi GetPlays GET /plays
RankingsApi GetRankings GET /rankings
RatingsApi GetConferenceSP GET /ratings/sp/conferences
RatingsApi GetElo GET /ratings/elo
RatingsApi GetFPI GET /ratings/fpi
RatingsApi GetSP GET /ratings/sp
RatingsApi GetSRS GET /ratings/srs
RecruitingApi GetAggregatedTeamRecruitingRatings GET /recruiting/groups
RecruitingApi GetRecruits GET /recruiting/players
RecruitingApi GetTeamRecruitingRankings GET /recruiting/teams
StatsApi GetAdvancedGameStats GET /stats/game/advanced
StatsApi GetAdvancedSeasonStats GET /stats/season/advanced
StatsApi GetCategories GET /stats/categories
StatsApi GetPlayerSeasonStats GET /stats/player/season
StatsApi GetTeamStats GET /stats/season
TeamsApi GetFBSTeams GET /teams/fbs
TeamsApi GetMatchup GET /teams/matchup
TeamsApi GetRoster GET /roster
TeamsApi GetTalent GET /talent
TeamsApi GetTeams GET /teams
VenuesApi GetVenues GET /venues

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

apiKey

  • Type: Bearer Authentication

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages