Skip to content

Latest commit

 

History

History
209 lines (159 loc) · 5.95 KB

DraftApi.md

File metadata and controls

209 lines (159 loc) · 5.95 KB

CFBSharp.Api.DraftApi

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

Method HTTP request Description
GetDraftPicks GET /draft/picks List of NFL Draft picks
GetNFLPositions GET /draft/positions List of NFL positions
GetNFLTeams GET /draft/teams List 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

Name Type Description Notes
year int? Year filter [optional]
nflTeam string NFL team filter [optional]
college string Player college filter [optional]
conference string College confrence abbreviation filter [optional]
position string NFL 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]