cfb.DraftApi

July 8, 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

[DraftPick] getDraftPicks(opts)

List of NFL Draft picks

List of NFL Draft picks

Example

var cfb = require('cfb.js');
var defaultClient = cfb.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';

var apiInstance = new cfb.DraftApi();

var opts = { 
  'year': 56, // Number | Year filter
  'nflTeam': "nflTeam_example", // String | NFL team filter
  'college': "college_example", // String | Player college filter
  'conference': "conference_example", // String | College confrence abbreviation filter
  'position': "position_example" // String | NFL position filter
};
apiInstance.getDraftPicks(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

NameTypeDescriptionNotes
yearNumberYear filter[optional]
nflTeamStringNFL team filter[optional]
collegeStringPlayer college filter[optional]
conferenceStringCollege confrence abbreviation filter[optional]
positionStringNFL position filter[optional]

Return type

[DraftPick]

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getNFLPositions

[DraftPosition] getNFLPositions()

List of NFL positions

List of NFL positions

Example

var cfb = require('cfb.js');
var defaultClient = cfb.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';

var apiInstance = new cfb.DraftApi();
apiInstance.getNFLPositions().then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

[DraftPosition]

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getNFLTeams

[DraftTeam] getNFLTeams()

List of NFL teams

List of NFL teams

Example

var cfb = require('cfb.js');
var defaultClient = cfb.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';

var apiInstance = new cfb.DraftApi();
apiInstance.getNFLTeams().then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

[DraftTeam]

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json