CFBSharp.Api.PlayersApi

October 26, 2022 ยท View on GitHub

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

MethodHTTP requestDescription
GetPlayerSeasonStatsGET /stats/player/seasonPlayer stats by season
GetPlayerUsageGET /player/usagePlayer usage metrics broken down by season
GetReturningProductionGET /player/returningTeam returning production metrics
GetTransferPortalGET /player/portalTransfer portal by season
PlayerSearchGET /player/searchSearch for player information

GetPlayerSeasonStats

ICollection GetPlayerSeasonStats (int? year, string team = null, string conference = null, int? startWeek = null, int? endWeek = null, string seasonType = null, string category = null)

Player stats by season

Season player stats

Example

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

namespace Example
{
    public class GetPlayerSeasonStatsExample
    {
        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 PlayersApi();
            var year = 56;  // int? | Year filter
            var team = team_example;  // string | Team filter (optional) 
            var conference = conference_example;  // string | Conference abbreviation filter (optional) 
            var startWeek = 56;  // int? | Start week filter (optional) 
            var endWeek = 56;  // int? | Start week filter (optional) 
            var seasonType = seasonType_example;  // string | Season type filter (regular, postseason, or both) (optional) 
            var category = category_example;  // string | Stat category filter (e.g. passing) (optional) 

            try
            {
                // Player stats by season
                ICollection<PlayerSeasonStat> result = apiInstance.GetPlayerSeasonStats(year, team, conference, startWeek, endWeek, seasonType, category);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlayersApi.GetPlayerSeasonStats: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year filter
teamstringTeam filter[optional]
conferencestringConference abbreviation filter[optional]
startWeekint?Start week filter[optional]
endWeekint?Start week filter[optional]
seasonTypestringSeason type filter (regular, postseason, or both)[optional]
categorystringStat category filter (e.g. passing)[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]

GetPlayerUsage

ICollection GetPlayerUsage (int? year, string team = null, string conference = null, string position = null, int? playerId = null, bool? excludeGarbageTime = null)

Player usage metrics broken down by season

Player usage metrics by season

Example

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

namespace Example
{
    public class GetPlayerUsageExample
    {
        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 PlayersApi();
            var year = 56;  // int? | Year filter (default to 2022)
            var team = team_example;  // string | Team filter (optional) 
            var conference = conference_example;  // string | Conference abbreviation filter (optional) 
            var position = position_example;  // string | Position abbreviation filter (optional) 
            var playerId = 56;  // int? | Player id filter (optional) 
            var excludeGarbageTime = true;  // bool? | Filter to remove garbage time plays from calculations (optional) 

            try
            {
                // Player usage metrics broken down by season
                ICollection<PlayerUsage> result = apiInstance.GetPlayerUsage(year, team, conference, position, playerId, excludeGarbageTime);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlayersApi.GetPlayerUsage: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year filter[default to 2022]
teamstringTeam filter[optional]
conferencestringConference abbreviation filter[optional]
positionstringPosition abbreviation filter[optional]
playerIdint?Player id filter[optional]
excludeGarbageTimebool?Filter to remove garbage time plays from calculations[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]

GetReturningProduction

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

Team returning production metrics

Returning production metrics

Example

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

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

            try
            {
                // Team returning production metrics
                ICollection<ReturningProduction> result = apiInstance.GetReturningProduction(year, team, conference);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlayersApi.GetReturningProduction: " + e.Message );
            }
        }
    }
}

Parameters

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

GetTransferPortal

ICollection GetTransferPortal (int? year)

Transfer portal by season

Transfer portal by season

Example

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

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

            try
            {
                // Transfer portal by season
                ICollection<PortalPlayer> result = apiInstance.GetTransferPortal(year);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlayersApi.GetTransferPortal: " + 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]

PlayerSearch

ICollection PlayerSearch (string searchTerm, string position = null, string team = null, int? year = null)

Search for player information

Search for players

Example

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

namespace Example
{
    public class PlayerSearchExample
    {
        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 PlayersApi();
            var searchTerm = searchTerm_example;  // string | Term to search on
            var position = position_example;  // string | Position abbreviation filter (optional) 
            var team = team_example;  // string | Team filter (optional) 
            var year = 56;  // int? | Year filter (optional) 

            try
            {
                // Search for player information
                ICollection<PlayerSearchResult> result = apiInstance.PlayerSearch(searchTerm, position, team, year);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PlayersApi.PlayerSearch: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
searchTermstringTerm to search on
positionstringPosition abbreviation filter[optional]
teamstringTeam filter[optional]
yearint?Year 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]