Skip to content

Commit

Permalink
fg ep
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueSCar committed Dec 9, 2023
1 parent e7a6fe0 commit ebcd0c9
Show file tree
Hide file tree
Showing 256 changed files with 674 additions and 386 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ cfb - JavaScript client for cfb.js
This is an API for accessing all sorts of college football data. Please note that API keys should be supplied with \"Bearer \" prepended (e.g. \"Bearer your_key\"). API keys can be acquired from the CollegeFootballData.com website.
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 4.5.1
- Package version: 4.5.1
- API version: 4.5.2
- Package version: 4.5.2
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen

## Installation
Expand Down Expand Up @@ -110,6 +110,7 @@ Class | Method | HTTP request | Description
*cfb.GamesApi* | [**getScoreboard**](docs/GamesApi.md#getScoreboard) | **GET** /scoreboard | Live game results (Patreon only)
*cfb.GamesApi* | [**getTeamGameStats**](docs/GamesApi.md#getTeamGameStats) | **GET** /games/teams | Team game stats
*cfb.GamesApi* | [**getTeamRecords**](docs/GamesApi.md#getTeamRecords) | **GET** /records | Team records
*cfb.MetricsApi* | [**getFGEP**](docs/MetricsApi.md#getFGEP) | **GET** /metrics/fg/ep | Field Goal Expected Points
*cfb.MetricsApi* | [**getGamePPA**](docs/MetricsApi.md#getGamePPA) | **GET** /ppa/games | Team Predicated Points Added (PPA/EPA) by game
*cfb.MetricsApi* | [**getPlayerGamePPA**](docs/MetricsApi.md#getPlayerGamePPA) | **GET** /ppa/players/games | Player Predicated Points Added (PPA/EPA) broken down by game
*cfb.MetricsApi* | [**getPlayerSeasonPPA**](docs/MetricsApi.md#getPlayerSeasonPPA) | **GET** /ppa/players/season | Player Predicated Points Added (PPA/EPA) broken down by season
Expand Down Expand Up @@ -185,6 +186,7 @@ Class | Method | HTTP request | Description
- [cfb.DraftTeam](docs/DraftTeam.md)
- [cfb.Drive](docs/Drive.md)
- [cfb.DriveStartTime](docs/DriveStartTime.md)
- [cfb.FieldGoalExpectedPoints](docs/FieldGoalExpectedPoints.md)
- [cfb.Game](docs/Game.md)
- [cfb.GameLines](docs/GameLines.md)
- [cfb.GameLinesLines](docs/GameLinesLines.md)
Expand Down
10 changes: 10 additions & 0 deletions docs/FieldGoalExpectedPoints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# cfb.FieldGoalExpectedPoints

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**yardsToGoal** | **Number** | | [optional]
**distance** | **Number** | | [optional]
**expectedPoints** | **Number** | | [optional]


45 changes: 45 additions & 0 deletions docs/MetricsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All URIs are relative to *https://api.collegefootballdata.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getFGEP**](MetricsApi.md#getFGEP) | **GET** /metrics/fg/ep | Field Goal Expected Points
[**getGamePPA**](MetricsApi.md#getGamePPA) | **GET** /ppa/games | Team Predicated Points Added (PPA/EPA) by game
[**getPlayerGamePPA**](MetricsApi.md#getPlayerGamePPA) | **GET** /ppa/players/games | Player Predicated Points Added (PPA/EPA) broken down by game
[**getPlayerSeasonPPA**](MetricsApi.md#getPlayerSeasonPPA) | **GET** /ppa/players/season | Player Predicated Points Added (PPA/EPA) broken down by season
Expand All @@ -13,6 +14,50 @@ Method | HTTP request | Description
[**getWinProbabilityData**](MetricsApi.md#getWinProbabilityData) | **GET** /metrics/wp | Win probability chart data


<a name="getFGEP"></a>
# **getFGEP**
> [FieldGoalExpectedPoints] getFGEP()
Field Goal Expected Points

Field Goal Expected Poitns

### Example
```javascript
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.MetricsApi();
apiInstance.getFGEP().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

[**[FieldGoalExpectedPoints]**](FieldGoalExpectedPoints.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth)

### HTTP request headers

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

<a name="getGamePPA"></a>
# **getGamePPA**
> [GamePPA] getGamePPA(year, opts)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cfb.js",
"version": "4.5.1",
"version": "4.5.2",
"description": "This_is_an_API_for_accessing_all_sorts_of_college_football_data___Please_note_that_API_keys_should_be_supplied_with_Bearer__prepended__e_g__Bearer_your_key__API_keys_can_be_acquired_from_the_CollegeFootballData_com_website_",
"license": "MIT",
"main": "src/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* College Football Data API
* This is an API for accessing all sorts of college football data. Please note that API keys should be supplied with \"Bearer \" prepended (e.g. \"Bearer your_key\"). API keys can be acquired from the CollegeFootballData.com website.
*
* OpenAPI spec version: 4.5.1
* OpenAPI spec version: 4.5.2
* Contact: admin@collegefootballdata.com
*
* NOTE: This class is auto generated by the swagger code generator program.
Expand Down Expand Up @@ -33,7 +33,7 @@

/**
* @module ApiClient
* @version 4.5.1
* @version 4.5.2
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions src/api/BettingApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* College Football Data API
* This is an API for accessing all sorts of college football data. Please note that API keys should be supplied with \"Bearer \" prepended (e.g. \"Bearer your_key\"). API keys can be acquired from the CollegeFootballData.com website.
*
* OpenAPI spec version: 4.5.1
* OpenAPI spec version: 4.5.2
* Contact: admin@collegefootballdata.com
*
* NOTE: This class is auto generated by the swagger code generator program.
Expand Down Expand Up @@ -34,7 +34,7 @@
/**
* Betting service.
* @module api/BettingApi
* @version 4.5.1
* @version 4.5.2
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions src/api/CoachesApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* College Football Data API
* This is an API for accessing all sorts of college football data. Please note that API keys should be supplied with \"Bearer \" prepended (e.g. \"Bearer your_key\"). API keys can be acquired from the CollegeFootballData.com website.
*
* OpenAPI spec version: 4.5.1
* OpenAPI spec version: 4.5.2
* Contact: admin@collegefootballdata.com
*
* NOTE: This class is auto generated by the swagger code generator program.
Expand Down Expand Up @@ -34,7 +34,7 @@
/**
* Coaches service.
* @module api/CoachesApi
* @version 4.5.1
* @version 4.5.2
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions src/api/ConferencesApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* College Football Data API
* This is an API for accessing all sorts of college football data. Please note that API keys should be supplied with \"Bearer \" prepended (e.g. \"Bearer your_key\"). API keys can be acquired from the CollegeFootballData.com website.
*
* OpenAPI spec version: 4.5.1
* OpenAPI spec version: 4.5.2
* Contact: admin@collegefootballdata.com
*
* NOTE: This class is auto generated by the swagger code generator program.
Expand Down Expand Up @@ -34,7 +34,7 @@
/**
* Conferences service.
* @module api/ConferencesApi
* @version 4.5.1
* @version 4.5.2
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions src/api/DraftApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* College Football Data API
* This is an API for accessing all sorts of college football data. Please note that API keys should be supplied with \"Bearer \" prepended (e.g. \"Bearer your_key\"). API keys can be acquired from the CollegeFootballData.com website.
*
* OpenAPI spec version: 4.5.1
* OpenAPI spec version: 4.5.2
* Contact: admin@collegefootballdata.com
*
* NOTE: This class is auto generated by the swagger code generator program.
Expand Down Expand Up @@ -34,7 +34,7 @@
/**
* Draft service.
* @module api/DraftApi
* @version 4.5.1
* @version 4.5.2
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions src/api/DrivesApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* College Football Data API
* This is an API for accessing all sorts of college football data. Please note that API keys should be supplied with \"Bearer \" prepended (e.g. \"Bearer your_key\"). API keys can be acquired from the CollegeFootballData.com website.
*
* OpenAPI spec version: 4.5.1
* OpenAPI spec version: 4.5.2
* Contact: admin@collegefootballdata.com
*
* NOTE: This class is auto generated by the swagger code generator program.
Expand Down Expand Up @@ -34,7 +34,7 @@
/**
* Drives service.
* @module api/DrivesApi
* @version 4.5.1
* @version 4.5.2
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions src/api/GamesApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* College Football Data API
* This is an API for accessing all sorts of college football data. Please note that API keys should be supplied with \"Bearer \" prepended (e.g. \"Bearer your_key\"). API keys can be acquired from the CollegeFootballData.com website.
*
* OpenAPI spec version: 4.5.1
* OpenAPI spec version: 4.5.2
* Contact: admin@collegefootballdata.com
*
* NOTE: This class is auto generated by the swagger code generator program.
Expand Down Expand Up @@ -34,7 +34,7 @@
/**
* Games service.
* @module api/GamesApi
* @version 4.5.1
* @version 4.5.2
*/

/**
Expand Down
57 changes: 51 additions & 6 deletions src/api/MetricsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* College Football Data API
* This is an API for accessing all sorts of college football data. Please note that API keys should be supplied with \"Bearer \" prepended (e.g. \"Bearer your_key\"). API keys can be acquired from the CollegeFootballData.com website.
*
* OpenAPI spec version: 4.5.1
* OpenAPI spec version: 4.5.2
* Contact: admin@collegefootballdata.com
*
* NOTE: This class is auto generated by the swagger code generator program.
Expand All @@ -17,24 +17,24 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'model/GamePPA', 'model/PlayWP', 'model/PlayerGamePPA', 'model/PlayerSeasonPPA', 'model/PredictedPoints', 'model/PregameWP', 'model/TeamPPA'], factory);
define(['ApiClient', 'model/FieldGoalExpectedPoints', 'model/GamePPA', 'model/PlayWP', 'model/PlayerGamePPA', 'model/PlayerSeasonPPA', 'model/PredictedPoints', 'model/PregameWP', 'model/TeamPPA'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('../model/GamePPA'), require('../model/PlayWP'), require('../model/PlayerGamePPA'), require('../model/PlayerSeasonPPA'), require('../model/PredictedPoints'), require('../model/PregameWP'), require('../model/TeamPPA'));
module.exports = factory(require('../ApiClient'), require('../model/FieldGoalExpectedPoints'), require('../model/GamePPA'), require('../model/PlayWP'), require('../model/PlayerGamePPA'), require('../model/PlayerSeasonPPA'), require('../model/PredictedPoints'), require('../model/PregameWP'), require('../model/TeamPPA'));
} else {
// Browser globals (root is window)
if (!root.cfb) {
root.cfb = {};
}
root.cfb.MetricsApi = factory(root.cfb.ApiClient, root.cfb.GamePPA, root.cfb.PlayWP, root.cfb.PlayerGamePPA, root.cfb.PlayerSeasonPPA, root.cfb.PredictedPoints, root.cfb.PregameWP, root.cfb.TeamPPA);
root.cfb.MetricsApi = factory(root.cfb.ApiClient, root.cfb.FieldGoalExpectedPoints, root.cfb.GamePPA, root.cfb.PlayWP, root.cfb.PlayerGamePPA, root.cfb.PlayerSeasonPPA, root.cfb.PredictedPoints, root.cfb.PregameWP, root.cfb.TeamPPA);
}
}(this, function(ApiClient, GamePPA, PlayWP, PlayerGamePPA, PlayerSeasonPPA, PredictedPoints, PregameWP, TeamPPA) {
}(this, function(ApiClient, FieldGoalExpectedPoints, GamePPA, PlayWP, PlayerGamePPA, PlayerSeasonPPA, PredictedPoints, PregameWP, TeamPPA) {
'use strict';

/**
* Metrics service.
* @module api/MetricsApi
* @version 4.5.1
* @version 4.5.2
*/

/**
Expand All @@ -49,6 +49,51 @@



/**
* Field Goal Expected Points
* Field Goal Expected Poitns
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/FieldGoalExpectedPoints>} and HTTP response
*/
this.getFGEPWithHttpInfo = function() {
var postBody = null;


var pathParams = {
};
var queryParams = {
};
var collectionQueryParams = {
};
var headerParams = {
};
var formParams = {
};

var authNames = ['ApiKeyAuth'];
var contentTypes = [];
var accepts = ['application/json'];
var returnType = [FieldGoalExpectedPoints];

return this.apiClient.callApi(
'/metrics/fg/ep', 'GET',
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType
);
}

/**
* Field Goal Expected Points
* Field Goal Expected Poitns
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/FieldGoalExpectedPoints>}
*/
this.getFGEP = function() {
return this.getFGEPWithHttpInfo()
.then(function(response_and_data) {
return response_and_data.data;
});
}


/**
* Team Predicated Points Added (PPA/EPA) by game
* Predicted Points Added (PPA) by game
Expand Down
4 changes: 2 additions & 2 deletions src/api/PlayersApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* College Football Data API
* This is an API for accessing all sorts of college football data. Please note that API keys should be supplied with \"Bearer \" prepended (e.g. \"Bearer your_key\"). API keys can be acquired from the CollegeFootballData.com website.
*
* OpenAPI spec version: 4.5.1
* OpenAPI spec version: 4.5.2
* Contact: admin@collegefootballdata.com
*
* NOTE: This class is auto generated by the swagger code generator program.
Expand Down Expand Up @@ -34,7 +34,7 @@
/**
* Players service.
* @module api/PlayersApi
* @version 4.5.1
* @version 4.5.2
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions src/api/PlaysApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* College Football Data API
* This is an API for accessing all sorts of college football data. Please note that API keys should be supplied with \"Bearer \" prepended (e.g. \"Bearer your_key\"). API keys can be acquired from the CollegeFootballData.com website.
*
* OpenAPI spec version: 4.5.1
* OpenAPI spec version: 4.5.2
* Contact: admin@collegefootballdata.com
*
* NOTE: This class is auto generated by the swagger code generator program.
Expand Down Expand Up @@ -34,7 +34,7 @@
/**
* Plays service.
* @module api/PlaysApi
* @version 4.5.1
* @version 4.5.2
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions src/api/RankingsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* College Football Data API
* This is an API for accessing all sorts of college football data. Please note that API keys should be supplied with \"Bearer \" prepended (e.g. \"Bearer your_key\"). API keys can be acquired from the CollegeFootballData.com website.
*
* OpenAPI spec version: 4.5.1
* OpenAPI spec version: 4.5.2
* Contact: admin@collegefootballdata.com
*
* NOTE: This class is auto generated by the swagger code generator program.
Expand Down Expand Up @@ -34,7 +34,7 @@
/**
* Rankings service.
* @module api/RankingsApi
* @version 4.5.1
* @version 4.5.2
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions src/api/RatingsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* College Football Data API
* This is an API for accessing all sorts of college football data. Please note that API keys should be supplied with \"Bearer \" prepended (e.g. \"Bearer your_key\"). API keys can be acquired from the CollegeFootballData.com website.
*
* OpenAPI spec version: 4.5.1
* OpenAPI spec version: 4.5.2
* Contact: admin@collegefootballdata.com
*
* NOTE: This class is auto generated by the swagger code generator program.
Expand Down Expand Up @@ -34,7 +34,7 @@
/**
* Ratings service.
* @module api/RatingsApi
* @version 4.5.1
* @version 4.5.2
*/

/**
Expand Down
Loading

0 comments on commit ebcd0c9

Please sign in to comment.