Skip to content

Latest commit

 

History

History
288 lines (204 loc) · 8.03 KB

RatingsApi.md

File metadata and controls

288 lines (204 loc) · 8.03 KB

cfb.RatingsApi

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

Method HTTP request Description
getConferenceSPRatings GET /ratings/sp/conferences Historical SP+ ratings by conference
getEloRatings GET /ratings/elo Historical Elo ratings
getFPIRatings GET /ratings/fpi Historical FPI ratings
getSPRatings GET /ratings/sp Historical SP+ ratings
getSRSRatings GET /ratings/srs Historical SRS ratings

getConferenceSPRatings

[ConferenceSPRating] getConferenceSPRatings(opts)

Historical SP+ ratings by conference

Get average SP+ historical rating data by conference

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

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

Parameters

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

Return type

[ConferenceSPRating]

Authorization

ApiKeyAuth

HTTP request headers

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

getEloRatings

[TeamEloRating] getEloRatings(opts)

Historical Elo ratings

Elo rating 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.RatingsApi();

var opts = { 
  'year': 56, // Number | Season filter
  'week': 56, // Number | Maximum week filter
  'seasonType': "seasonType_example", // String | Maximum season type to consider (defaults to regular if week is specified else defaults to postseason)
  'team': "team_example", // String | Team filter
  'conference': "conference_example" // String | Conference filter
};
apiInstance.getEloRatings(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
year Number Season filter [optional]
week Number Maximum week filter [optional]
seasonType String Maximum season type to consider (defaults to regular if week is specified else defaults to postseason) [optional]
team String Team filter [optional]
conference String Conference filter [optional]

Return type

[TeamEloRating]

Authorization

ApiKeyAuth

HTTP request headers

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

getFPIRatings

[TeamFPIRating] getFPIRatings(opts)

Historical FPI ratings

FPI rating 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.RatingsApi();

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

Parameters

Name Type Description Notes
year Number Season filter [optional]
team String Team filter [optional]
conference String Conference filter [optional]

Return type

[TeamFPIRating]

Authorization

ApiKeyAuth

HTTP request headers

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

getSPRatings

[TeamSPRating] getSPRatings(opts)

Historical SP+ ratings

SP+ rating 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.RatingsApi();

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

Parameters

Name Type Description Notes
year Number Season filter (required if team not specified) [optional]
team String Team filter (required if year not specified) [optional]

Return type

[TeamSPRating]

Authorization

ApiKeyAuth

HTTP request headers

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

getSRSRatings

[TeamSRSRating] getSRSRatings(opts)

Historical SRS ratings

SRS rating data (requires either a year or team specified)

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

var opts = { 
  'year': 56, // Number | Season filter (required if team not specified)
  'team': "team_example", // String | Team filter (required if year not specified)
  'conference': "conference_example" // String | Conference filter
};
apiInstance.getSRSRatings(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
year Number Season filter (required if team not specified) [optional]
team String Team filter (required if year not specified) [optional]
conference String Conference filter [optional]

Return type

[TeamSRSRating]

Authorization

ApiKeyAuth

HTTP request headers

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