Skip to content

Latest commit

 

History

History
89 lines (69 loc) · 3.14 KB

BettingApi.md

File metadata and controls

89 lines (69 loc) · 3.14 KB

CFBSharp.Api.BettingApi

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

Method HTTP request Description
GetLines GET /lines Betting lines

GetLines

ICollection GetLines (int? gameId = null, int? year = null, int? week = null, string seasonType = null, string team = null, string home = null, string away = null, string conference = null)

Betting lines

Closing betting lines

Example

using System;
using System.Diagnostics;
using CFBSharp.Api;
using CFBSharp.Client;
using CFBSharp.Model;

namespace Example
{
    public class GetLinesExample
    {
        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 BettingApi();
            var gameId = 56;  // int? | Game id filter (optional) 
            var year = 56;  // int? | Year/season filter for games (optional) 
            var week = 56;  // int? | Week filter (optional) 
            var seasonType = seasonType_example;  // string | Season type filter (regular or postseason) (optional)  (default to regular)
            var team = team_example;  // string | Team (optional) 
            var home = home_example;  // string | Home team filter (optional) 
            var away = away_example;  // string | Away team filter (optional) 
            var conference = conference_example;  // string | Conference abbreviation filter (optional) 

            try
            {
                // Betting lines
                ICollection<GameLines> result = apiInstance.GetLines(gameId, year, week, seasonType, team, home, away, conference);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling BettingApi.GetLines: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
gameId int? Game id filter [optional]
year int? Year/season filter for games [optional]
week int? Week filter [optional]
seasonType string Season type filter (regular or postseason) [optional] [default to regular]
team string Team [optional]
home string Home team filter [optional]
away string Away team filter [optional]
conference string Conference abbreviation filter [optional]

Return type

ICollection

Authorization

ApiKeyAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]