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 b91678b commit cb8a41e
Show file tree
Hide file tree
Showing 139 changed files with 531 additions and 142 deletions.
10 changes: 5 additions & 5 deletions CFBSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CFBSharp", "src\CFBSharp\CFBSharp.csproj", "{0043F1F2-3280-417D-B7EA-A2FD2E5756F6}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CFBSharp", "src\CFBSharp\CFBSharp.csproj", "{0A3FE40E-E942-438D-A584-6ACCE805C0A2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0043F1F2-3280-417D-B7EA-A2FD2E5756F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0043F1F2-3280-417D-B7EA-A2FD2E5756F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0043F1F2-3280-417D-B7EA-A2FD2E5756F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0043F1F2-3280-417D-B7EA-A2FD2E5756F6}.Release|Any CPU.Build.0 = Release|Any CPU
{0A3FE40E-E942-438D-A584-6ACCE805C0A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A3FE40E-E942-438D-A584-6ACCE805C0A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A3FE40E-E942-438D-A584-6ACCE805C0A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A3FE40E-E942-438D-A584-6ACCE805C0A2}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ This is an API for accessing all sorts of college football data. Please note th

This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 4.5.1
- SDK version: 4.5.1
- API version: 4.5.2
- SDK version: 4.5.2
- Build package: io.swagger.codegen.languages.CSharpClientCodegen

<a name="frameworks-supported"></a>
Expand Down Expand Up @@ -104,6 +104,7 @@ Class | Method | HTTP request | Description
*GamesApi* | [**GetScoreboard**](docs/GamesApi.md#getscoreboard) | **GET** /scoreboard | Live game results (Patreon only)
*GamesApi* | [**GetTeamGameStats**](docs/GamesApi.md#getteamgamestats) | **GET** /games/teams | Team game stats
*GamesApi* | [**GetTeamRecords**](docs/GamesApi.md#getteamrecords) | **GET** /records | Team records
*MetricsApi* | [**GetFGEP**](docs/MetricsApi.md#getfgep) | **GET** /metrics/fg/ep | Field Goal Expected Points
*MetricsApi* | [**GetGamePPA**](docs/MetricsApi.md#getgameppa) | **GET** /ppa/games | Team Predicated Points Added (PPA/EPA) by game
*MetricsApi* | [**GetPlayerGamePPA**](docs/MetricsApi.md#getplayergameppa) | **GET** /ppa/players/games | Player Predicated Points Added (PPA/EPA) broken down by game
*MetricsApi* | [**GetPlayerSeasonPPA**](docs/MetricsApi.md#getplayerseasonppa) | **GET** /ppa/players/season | Player Predicated Points Added (PPA/EPA) broken down by season
Expand Down Expand Up @@ -180,6 +181,7 @@ Class | Method | HTTP request | Description
- [Model.DraftTeam](docs/DraftTeam.md)
- [Model.Drive](docs/Drive.md)
- [Model.DriveStartTime](docs/DriveStartTime.md)
- [Model.FieldGoalExpectedPoints](docs/FieldGoalExpectedPoints.md)
- [Model.Game](docs/Game.md)
- [Model.GameLines](docs/GameLines.md)
- [Model.GameLinesLines](docs/GameLinesLines.md)
Expand Down
11 changes: 11 additions & 0 deletions docs/FieldGoalExpectedPoints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# CFBSharp.Model.FieldGoalExpectedPoints
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**YardsToGoal** | **int?** | | [optional]
**Distance** | **int?** | | [optional]
**ExpectedPoints** | **decimal?** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

63 changes: 63 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,68 @@ Method | HTTP request | Description
[**GetWinProbabilityData**](MetricsApi.md#getwinprobabilitydata) | **GET** /metrics/wp | Win probability chart data


<a name="getfgep"></a>
# **GetFGEP**
> ICollection<FieldGoalExpectedPoints> GetFGEP ()
Field Goal Expected Points

Field Goal Expected Poitns

### Example
```csharp
using System;
using System.Diagnostics;
using CFBSharp.Api;
using CFBSharp.Client;
using CFBSharp.Model;

namespace Example
{
public class GetFGEPExample
{
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 MetricsApi();

try
{
// Field Goal Expected Points
ICollection&lt;FieldGoalExpectedPoints&gt; result = apiInstance.GetFGEP();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling MetricsApi.GetFGEP: " + e.Message );
}
}
}
}
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**ICollection<FieldGoalExpectedPoints>**](FieldGoalExpectedPoints.md)

### Authorization

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

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

<a name="getgameppa"></a>
# **GetGamePPA**
> ICollection<GamePPA> GetGamePPA (int? year, int? week = null, string team = null, string conference = null, bool? excludeGarbageTime = null, string seasonType = null)
Expand Down
2 changes: 1 addition & 1 deletion src/CFBSharp/Api/BettingApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* 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: [email protected]
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
Expand Down
2 changes: 1 addition & 1 deletion src/CFBSharp/Api/CoachesApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* 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: [email protected]
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
Expand Down
2 changes: 1 addition & 1 deletion src/CFBSharp/Api/ConferencesApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* 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: [email protected]
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
Expand Down
2 changes: 1 addition & 1 deletion src/CFBSharp/Api/DraftApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* 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: [email protected]
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
Expand Down
2 changes: 1 addition & 1 deletion src/CFBSharp/Api/DrivesApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* 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: [email protected]
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
Expand Down
2 changes: 1 addition & 1 deletion src/CFBSharp/Api/GamesApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* 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: [email protected]
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
Expand Down
171 changes: 170 additions & 1 deletion src/CFBSharp/Api/MetricsApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* 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: [email protected]
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
Expand All @@ -25,6 +25,25 @@ public interface IMetricsApi : IApiAccessor
{
#region Synchronous Operations
/// <summary>
/// Field Goal Expected Points
/// </summary>
/// <remarks>
/// Field Goal Expected Poitns
/// </remarks>
/// <exception cref="CFBSharp.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ICollection&lt;FieldGoalExpectedPoints&gt;</returns>
ICollection<FieldGoalExpectedPoints> GetFGEP ();

/// <summary>
/// Field Goal Expected Points
/// </summary>
/// <remarks>
/// Field Goal Expected Poitns
/// </remarks>
/// <exception cref="CFBSharp.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of ICollection&lt;FieldGoalExpectedPoints&gt;</returns>
ApiResponse<ICollection<FieldGoalExpectedPoints>> GetFGEPWithHttpInfo ();
/// <summary>
/// Team Predicated Points Added (PPA/EPA) by game
/// </summary>
/// <remarks>
Expand Down Expand Up @@ -224,6 +243,25 @@ public interface IMetricsApi : IApiAccessor
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
/// Field Goal Expected Points
/// </summary>
/// <remarks>
/// Field Goal Expected Poitns
/// </remarks>
/// <exception cref="CFBSharp.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ICollection&lt;FieldGoalExpectedPoints&gt;</returns>
System.Threading.Tasks.Task<ICollection<FieldGoalExpectedPoints>> GetFGEPAsync ();

/// <summary>
/// Field Goal Expected Points
/// </summary>
/// <remarks>
/// Field Goal Expected Poitns
/// </remarks>
/// <exception cref="CFBSharp.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse (ICollection&lt;FieldGoalExpectedPoints&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<ICollection<FieldGoalExpectedPoints>>> GetFGEPAsyncWithHttpInfo ();
/// <summary>
/// Team Predicated Points Added (PPA/EPA) by game
/// </summary>
/// <remarks>
Expand Down Expand Up @@ -520,6 +558,137 @@ public void AddDefaultHeader(string key, string value)
this.Configuration.AddDefaultHeader(key, value);
}

/// <summary>
/// Field Goal Expected Points Field Goal Expected Poitns
/// </summary>
/// <exception cref="CFBSharp.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ICollection&lt;FieldGoalExpectedPoints&gt;</returns>
public ICollection<FieldGoalExpectedPoints> GetFGEP ()
{
ApiResponse<ICollection<FieldGoalExpectedPoints>> localVarResponse = GetFGEPWithHttpInfo();
return localVarResponse.Data;
}

/// <summary>
/// Field Goal Expected Points Field Goal Expected Poitns
/// </summary>
/// <exception cref="CFBSharp.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of ICollection&lt;FieldGoalExpectedPoints&gt;</returns>
public ApiResponse< ICollection<FieldGoalExpectedPoints> > GetFGEPWithHttpInfo ()
{

var localVarPath = "./metrics/fg/ep";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;

// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);


// authentication (ApiKeyAuth) required
if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarHeaderParams["Authorization"] = this.Configuration.GetApiKeyWithPrefix("Authorization");
}

// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);

int localVarStatusCode = (int) localVarResponse.StatusCode;

if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetFGEP", localVarResponse);
if (exception != null) throw exception;
}

return new ApiResponse<ICollection<FieldGoalExpectedPoints>>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(ICollection<FieldGoalExpectedPoints>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<FieldGoalExpectedPoints>)));
}

/// <summary>
/// Field Goal Expected Points Field Goal Expected Poitns
/// </summary>
/// <exception cref="CFBSharp.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ICollection&lt;FieldGoalExpectedPoints&gt;</returns>
public async System.Threading.Tasks.Task<ICollection<FieldGoalExpectedPoints>> GetFGEPAsync ()
{
ApiResponse<ICollection<FieldGoalExpectedPoints>> localVarResponse = await GetFGEPAsyncWithHttpInfo();
return localVarResponse.Data;

}

/// <summary>
/// Field Goal Expected Points Field Goal Expected Poitns
/// </summary>
/// <exception cref="CFBSharp.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse (ICollection&lt;FieldGoalExpectedPoints&gt;)</returns>
public async System.Threading.Tasks.Task<ApiResponse<ICollection<FieldGoalExpectedPoints>>> GetFGEPAsyncWithHttpInfo ()
{

var localVarPath = "./metrics/fg/ep";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;

// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);


// authentication (ApiKeyAuth) required
if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")))
{
localVarHeaderParams["Authorization"] = this.Configuration.GetApiKeyWithPrefix("Authorization");
}

// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);

int localVarStatusCode = (int) localVarResponse.StatusCode;

if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetFGEP", localVarResponse);
if (exception != null) throw exception;
}

return new ApiResponse<ICollection<FieldGoalExpectedPoints>>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(ICollection<FieldGoalExpectedPoints>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<FieldGoalExpectedPoints>)));
}

/// <summary>
/// Team Predicated Points Added (PPA/EPA) by game Predicted Points Added (PPA) by game
/// </summary>
Expand Down
Loading

0 comments on commit cb8a41e

Please sign in to comment.