Skip to content

Latest commit

 

History

History
278 lines (192 loc) · 6.5 KB

TeamsApi.md

File metadata and controls

278 lines (192 loc) · 6.5 KB

cfb.TeamsApi

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

Method HTTP request Description
getFbsTeams GET /teams/fbs FBS team list
getRoster GET /roster Team rosters
getTalent GET /talent Team talent composite rankings
getTeamMatchup GET /teams/matchup Team matchup history
getTeams GET /teams Team information

getFbsTeams

[Team] getFbsTeams(opts)

FBS team list

Information on major division 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.TeamsApi();

var opts = { 
  'year': 56 // Number | Year filter
};
apiInstance.getFbsTeams(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
year Number Year filter [optional]

Return type

[Team]

Authorization

ApiKeyAuth

HTTP request headers

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

getRoster

[Player] getRoster(opts)

Team rosters

Roster data

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.TeamsApi();

var opts = { 
  'team': "team_example", // String | Team name
  'year': 56 // Number | Season year
};
apiInstance.getRoster(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
team String Team name [optional]
year Number Season year [optional]

Return type

[Player]

Authorization

ApiKeyAuth

HTTP request headers

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

getTalent

[TeamTalent] getTalent(opts)

Team talent composite rankings

Team talent composite

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.TeamsApi();

var opts = { 
  'year': 56 // Number | Year filter
};
apiInstance.getTalent(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
year Number Year filter [optional]

Return type

[TeamTalent]

Authorization

ApiKeyAuth

HTTP request headers

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

getTeamMatchup

TeamMatchup getTeamMatchup(team1, team2, opts)

Team matchup history

Matchup history

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.TeamsApi();

var team1 = "team1_example"; // String | First team

var team2 = "team2_example"; // String | Second team

var opts = { 
  'minYear': 56, // Number | Minimum year
  'maxYear': 56 // Number | Maximum year
};
apiInstance.getTeamMatchup(team1, team2, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
team1 String First team
team2 String Second team
minYear Number Minimum year [optional]
maxYear Number Maximum year [optional]

Return type

TeamMatchup

Authorization

ApiKeyAuth

HTTP request headers

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

getTeams

[Team] getTeams(opts)

Team information

Get team information

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.TeamsApi();

var opts = { 
  'conference': "conference_example" // String | Conference abbreviation filter
};
apiInstance.getTeams(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
conference String Conference abbreviation filter [optional]

Return type

[Team]

Authorization

ApiKeyAuth

HTTP request headers

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