CFBSharp.Api.DraftApi

April 24, 2021 ยท View on GitHub

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

MethodHTTP requestDescription
GetDraftPicksGET /draft/picksList of NFL Draft picks
GetNFLPositionsGET /draft/positionsList of NFL positions
GetNFLTeamsGET /draft/teamsList of NFL teams

GetDraftPicks

ICollection GetDraftPicks (int? year = null, string nflTeam = null, string college = null, string conference = null, string position = null)

List of NFL Draft picks

List of NFL Draft picks

Example

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

namespace Example
{
    public class GetDraftPicksExample
    {
        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 DraftApi();
            var year = 56;  // int? | Year filter (optional) 
            var nflTeam = nflTeam_example;  // string | NFL team filter (optional) 
            var college = college_example;  // string | Player college filter (optional) 
            var conference = conference_example;  // string | College confrence abbreviation filter (optional) 
            var position = position_example;  // string | NFL position filter (optional) 

            try
            {
                // List of NFL Draft picks
                ICollection<DraftPick> result = apiInstance.GetDraftPicks(year, nflTeam, college, conference, position);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DraftApi.GetDraftPicks: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
yearint?Year filter[optional]
nflTeamstringNFL team filter[optional]
collegestringPlayer college filter[optional]
conferencestringCollege confrence abbreviation filter[optional]
positionstringNFL position 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]

GetNFLPositions

ICollection GetNFLPositions ()

List of NFL positions

List of NFL positions

Example

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

namespace Example
{
    public class GetNFLPositionsExample
    {
        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 DraftApi();

            try
            {
                // List of NFL positions
                ICollection<DraftPosition> result = apiInstance.GetNFLPositions();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DraftApi.GetNFLPositions: " + 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]

GetNFLTeams

ICollection GetNFLTeams ()

List of NFL teams

List of NFL teams

Example

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

namespace Example
{
    public class GetNFLTeamsExample
    {
        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 DraftApi();

            try
            {
                // List of NFL teams
                ICollection<DraftTeam> result = apiInstance.GetNFLTeams();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DraftApi.GetNFLTeams: " + 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]