diff --git a/FantasyData.Api.Client.NetCore/Clients/BaseClient.cs b/FantasyData.Api.Client.NetCore/Clients/BaseClient.cs
new file mode 100644
index 0000000..a311749
--- /dev/null
+++ b/FantasyData.Api.Client.NetCore/Clients/BaseClient.cs
@@ -0,0 +1,77 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Runtime.Serialization.Json;
+using System.Text;
+
+namespace FantasyData.Api.Client.NetCore
+{
+ public abstract class BaseClient
+ {
+
+ ///
+ /// The host name for making API calls.
+ ///
+ /// Default value is api.fantasydata.net
+ public string Host { get; set; }
+
+ ///
+ /// The client license key used to make API calls.
+ ///
+ public string ApiKey { get; set; }
+
+ ///
+ /// Indicates whether API calls will be made over secure https connection.
+ ///
+ /// Default value is true
+ public bool Https { get; set; }
+
+ ///
+ /// The encoding type to be used in the WebClient for data pulled
+ ///
+ /// Default is UTF8
+ public Encoding Encoding { get; set; }
+
+ private string Scheme { get { return Https ? "https" : "http"; } }
+
+ public BaseClient(string apiKey)
+ {
+ Host = "api.fantasydata.net";
+ ApiKey = apiKey.Replace("-", "").ToLower();
+ Https = true;
+ Encoding = new UTF8Encoding();
+ }
+
+ public BaseClient(Guid apiKey) : this(apiKey.ToString()) { }
+
+ protected T Get(string apiCall) { return Get(apiCall, null); }
+
+ protected T Get(string apiCall, IList> parameters)
+ {
+ using (var client = new System.Net.WebClient())
+ {
+ // Add api key
+ client.Headers.Add("Ocp-Apim-Subscription-Key", ApiKey);
+ client.Encoding = Encoding;
+
+ // Construct url
+ var uri = new UriBuilder(this.Scheme, this.Host);
+ uri.Path = apiCall;
+ var url = uri.Uri.ToString().ToLower().Trim();
+
+ // Make sure parameters exist and add format=json
+ if (parameters == null) parameters = new List>();
+ parameters.Add(new KeyValuePair("format", "json"));
+
+ // Add parameters
+ foreach (var parameter in parameters)
+ url = url.Replace("{" + parameter.Key.ToLower() + "}", parameter.Value.ToLower().Trim());
+
+ // Download json, deserialize it, and return it
+ var json = client.DownloadString(url);
+ return JsonConvert.DeserializeObject(json);
+ }
+
+ }
+ }
+}
diff --git a/FantasyData.Api.Client.NetCore/Clients/CBB/CBBv2.cs b/FantasyData.Api.Client.NetCore/Clients/CBB/CBBv2.cs
new file mode 100644
index 0000000..5369f15
--- /dev/null
+++ b/FantasyData.Api.Client.NetCore/Clients/CBB/CBBv2.cs
@@ -0,0 +1,499 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using FantasyData.Api.Client.NetCore.Model.CBB;
+
+namespace FantasyData.Api.Client.NetCore
+{
+ public partial class CBBv2Client : BaseClient
+ {
+ public CBBv2Client(string apiKey) : base(apiKey) { }
+ public CBBv2Client(Guid apiKey) : base(apiKey) { }
+
+ ///
+ /// Get Are Games In Progress Asynchronous
+ ///
+ public Task GetAreAnyGamesInProgressAsync()
+ {
+ var parameters = new List>();
+ return Task.Run(() =>
+ base.Get("/cbb/v2/{format}/AreAnyGamesInProgress", parameters)
+ );
+ }
+
+ ///
+ /// Get Are Games In Progress
+ ///
+ public bool GetAreAnyGamesInProgress()
+ {
+ return this.GetAreAnyGamesInProgressAsync().Result;
+ }
+
+ ///
+ /// Get Box Score Asynchronous
+ ///
+ /// The GameID of an CBB game. GameIDs can be found in the Games API. Valid entries are 14620 or 16905
+ public Task GetBoxScoreAsync(int gameid)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("gameid", gameid.ToString()));
+ return Task.Run(() =>
+ base.Get("/cbb/v2/{format}/BoxScore/{gameid}", parameters)
+ );
+ }
+
+ ///
+ /// Get Box Score
+ ///
+ /// The GameID of an CBB game. GameIDs can be found in the Games API. Valid entries are 14620 or 16905
+ public BoxScore GetBoxScore(int gameid)
+ {
+ return this.GetBoxScoreAsync(gameid).Result;
+ }
+
+ ///
+ /// Get Box Scores by Date Asynchronous
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ public Task> GetBoxScoresAsync(string date)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("date", date.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/cbb/v2/{format}/BoxScores/{date}", parameters)
+ );
+ }
+
+ ///
+ /// Get Box Scores by Date
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ public List GetBoxScores(string date)
+ {
+ return this.GetBoxScoresAsync(date).Result;
+ }
+
+ ///
+ /// Get Box Scores by Date Delta Asynchronous
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ /// Only returns player statistics that have changed in the last X minutes. You specify how many minutes in time to go back. Valid entries are: 1 or 2.
+ public Task> GetBoxScoresDeltaAsync(string date, string minutes)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("date", date.ToString()));
+ parameters.Add(new KeyValuePair("minutes", minutes.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/cbb/v2/{format}/BoxScoresDelta/{date}/{minutes}", parameters)
+ );
+ }
+
+ ///
+ /// Get Box Scores by Date Delta
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ /// Only returns player statistics that have changed in the last X minutes. You specify how many minutes in time to go back. Valid entries are: 1 or 2.
+ public List GetBoxScoresDelta(string date, string minutes)
+ {
+ return this.GetBoxScoresDeltaAsync(date, minutes).Result;
+ }
+
+ ///
+ /// Get Current Season Asynchronous
+ ///
+ public Task GetCurrentSeasonAsync()
+ {
+ var parameters = new List>();
+ return Task.Run(() =>
+ base.Get("/cbb/v2/{format}/CurrentSeason", parameters)
+ );
+ }
+
+ ///
+ /// Get Current Season
+ ///
+ public Season GetCurrentSeason()
+ {
+ return this.GetCurrentSeasonAsync().Result;
+ }
+
+ ///
+ /// Get Games by Date Asynchronous
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ public Task> GetGamesByDateAsync(string date)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("date", date.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/cbb/v2/{format}/GamesByDate/{date}", parameters)
+ );
+ }
+
+ ///
+ /// Get Games by Date
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ public List GetGamesByDate(string date)
+ {
+ return this.GetGamesByDateAsync(date).Result;
+ }
+
+ ///
+ /// Get League Hierarchy Asynchronous
+ ///
+ public Task> GetLeagueHierarchyAsync()
+ {
+ var parameters = new List>();
+ return Task.Run>(() =>
+ base.Get>("/cbb/v2/{format}/LeagueHierarchy", parameters)
+ );
+ }
+
+ ///
+ /// Get League Hierarchy
+ ///
+ public List GetLeagueHierarchy()
+ {
+ return this.GetLeagueHierarchyAsync().Result;
+ }
+
+ ///
+ /// Get Player Details by Active Asynchronous
+ ///
+ public Task> GetPlayersAsync()
+ {
+ var parameters = new List>();
+ return Task.Run>(() =>
+ base.Get>("/cbb/v2/{format}/Players", parameters)
+ );
+ }
+
+ ///
+ /// Get Player Details by Active
+ ///
+ public List GetPlayers()
+ {
+ return this.GetPlayersAsync().Result;
+ }
+
+ ///
+ /// Get Player Details by Player Asynchronous
+ ///
+ /// Unique FantasyData Player ID. Example:60003802.
+ public Task GetPlayerAsync(int playerid)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("playerid", playerid.ToString()));
+ return Task.Run(() =>
+ base.Get("/cbb/v2/{format}/Player/{playerid}", parameters)
+ );
+ }
+
+ ///
+ /// Get Player Details by Player
+ ///
+ /// Unique FantasyData Player ID. Example:60003802.
+ public Player GetPlayer(int playerid)
+ {
+ return this.GetPlayerAsync(playerid).Result;
+ }
+
+ ///
+ /// Get Player Details by Team Asynchronous
+ ///
+ /// The abbreviation of the requested team. Examples: SF, NYY.
+ public Task> GetPlayersAsync(string team)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("team", team.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/cbb/v2/{format}/Players/{team}", parameters)
+ );
+ }
+
+ ///
+ /// Get Player Details by Team
+ ///
+ /// The abbreviation of the requested team. Examples: SF, NYY.
+ public List GetPlayers(string team)
+ {
+ return this.GetPlayersAsync(team).Result;
+ }
+
+ ///
+ /// Get Player Game Stats by Date Asynchronous
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ public Task> GetPlayerGameStatsByDateAsync(string date)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("date", date.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/cbb/v2/{format}/PlayerGameStatsByDate/{date}", parameters)
+ );
+ }
+
+ ///
+ /// Get Player Game Stats by Date
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ public List GetPlayerGameStatsByDate(string date)
+ {
+ return this.GetPlayerGameStatsByDateAsync(date).Result;
+ }
+
+ ///
+ /// Get Player Game Stats by Player Asynchronous
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ /// Unique FantasyData Player ID. Example:60003802.
+ public Task GetPlayerGameStatsByPlayerAsync(string date, int playerid)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("date", date.ToString()));
+ parameters.Add(new KeyValuePair("playerid", playerid.ToString()));
+ return Task.Run(() =>
+ base.Get("/cbb/v2/{format}/PlayerGameStatsByPlayer/{date}/{playerid}", parameters)
+ );
+ }
+
+ ///
+ /// Get Player Game Stats by Player
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ /// Unique FantasyData Player ID. Example:60003802.
+ public PlayerGame GetPlayerGameStatsByPlayer(string date, int playerid)
+ {
+ return this.GetPlayerGameStatsByPlayerAsync(date, playerid).Result;
+ }
+
+ ///
+ /// Get Player Season Stats Asynchronous
+ ///
+ /// Year of the season. Examples: 2015, 2016.
+ public Task> GetPlayerSeasonStatsAsync(string season)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("season", season.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/cbb/v2/{format}/PlayerSeasonStats/{season}", parameters)
+ );
+ }
+
+ ///
+ /// Get Player Season Stats
+ ///
+ /// Year of the season. Examples: 2015, 2016.
+ public List GetPlayerSeasonStats(string season)
+ {
+ return this.GetPlayerSeasonStatsAsync(season).Result;
+ }
+
+ ///
+ /// Get Player Season Stats By Player Asynchronous
+ ///
+ /// Year of the season. Examples: 2015, 2016.
+ /// Unique FantasyData Player ID. Example:60003802.
+ public Task GetPlayerSeasonStatsByPlayerAsync(string season, int playerid)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("season", season.ToString()));
+ parameters.Add(new KeyValuePair("playerid", playerid.ToString()));
+ return Task.Run(() =>
+ base.Get("/cbb/v2/{format}/PlayerSeasonStatsByPlayer/{season}/{playerid}", parameters)
+ );
+ }
+
+ ///
+ /// Get Player Season Stats By Player
+ ///
+ /// Year of the season. Examples: 2015, 2016.
+ /// Unique FantasyData Player ID. Example:60003802.
+ public PlayerSeason GetPlayerSeasonStatsByPlayer(string season, int playerid)
+ {
+ return this.GetPlayerSeasonStatsByPlayerAsync(season, playerid).Result;
+ }
+
+ ///
+ /// Get Player Season Stats by Team Asynchronous
+ ///
+ /// Year of the season. Examples: 2015, 2016.
+ /// The abbreviation of the requested team. Examples: SF, NYY.
+ public Task> GetPlayerSeasonStatsByTeamAsync(string season, string team)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("season", season.ToString()));
+ parameters.Add(new KeyValuePair("team", team.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/cbb/v2/{format}/PlayerSeasonStatsByTeam/{season}/{team}", parameters)
+ );
+ }
+
+ ///
+ /// Get Player Season Stats by Team
+ ///
+ /// Year of the season. Examples: 2015, 2016.
+ /// The abbreviation of the requested team. Examples: SF, NYY.
+ public List GetPlayerSeasonStatsByTeam(string season, string team)
+ {
+ return this.GetPlayerSeasonStatsByTeamAsync(season, team).Result;
+ }
+
+ ///
+ /// Get Projected Player Game Stats by Date Asynchronous
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ public Task> GetPlayerGameProjectionStatsByDateAsync(string date)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("date", date.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/cbb/v2/{format}/PlayerGameProjectionStatsByDate/{date}", parameters)
+ );
+ }
+
+ ///
+ /// Get Projected Player Game Stats by Date
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ public List GetPlayerGameProjectionStatsByDate(string date)
+ {
+ return this.GetPlayerGameProjectionStatsByDateAsync(date).Result;
+ }
+
+ ///
+ /// Get Projected Player Game Stats by Player Asynchronous
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ /// Unique FantasyData Player ID. Example:60003802.
+ public Task GetPlayerGameProjectionStatsByPlayerAsync(string date, int playerid)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("date", date.ToString()));
+ parameters.Add(new KeyValuePair("playerid", playerid.ToString()));
+ return Task.Run(() =>
+ base.Get("/cbb/v2/{format}/PlayerGameProjectionStatsByPlayer/{date}/{playerid}", parameters)
+ );
+ }
+
+ ///
+ /// Get Projected Player Game Stats by Player
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ /// Unique FantasyData Player ID. Example:60003802.
+ public PlayerGameProjection GetPlayerGameProjectionStatsByPlayer(string date, int playerid)
+ {
+ return this.GetPlayerGameProjectionStatsByPlayerAsync(date, playerid).Result;
+ }
+
+ ///
+ /// Get Schedules Asynchronous
+ ///
+ /// Year of the season. Examples: 2015, 2016.
+ public Task> GetGamesAsync(string season)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("season", season.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/cbb/v2/{format}/Games/{season}", parameters)
+ );
+ }
+
+ ///
+ /// Get Schedules
+ ///
+ /// Year of the season. Examples: 2015, 2016.
+ public List GetGames(string season)
+ {
+ return this.GetGamesAsync(season).Result;
+ }
+
+ ///
+ /// Get Team Game Stats by Date Asynchronous
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ public Task> GetTeamGameStatsByDateAsync(string date)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("date", date.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/cbb/v2/{format}/TeamGameStatsByDate/{date}", parameters)
+ );
+ }
+
+ ///
+ /// Get Team Game Stats by Date
+ ///
+ /// The date of the game(s). Examples: 2016-FEB-27, 2015-SEP-01.
+ public List GetTeamGameStatsByDate(string date)
+ {
+ return this.GetTeamGameStatsByDateAsync(date).Result;
+ }
+
+ ///
+ /// Get Team Season Stats Asynchronous
+ ///
+ /// Year of the season. Examples: 2015, 2016.
+ public Task> GetTeamSeasonStatsAsync(string season)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("season", season.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/cbb/v2/{format}/TeamSeasonStats/{season}", parameters)
+ );
+ }
+
+ ///
+ /// Get Team Season Stats
+ ///
+ /// Year of the season. Examples: 2015, 2016.
+ public List GetTeamSeasonStats(string season)
+ {
+ return this.GetTeamSeasonStatsAsync(season).Result;
+ }
+
+ ///
+ /// Get Teams Asynchronous
+ ///
+ public Task> GetTeamsAsync()
+ {
+ var parameters = new List>();
+ return Task.Run>(() =>
+ base.Get>("/cbb/v2/{format}/teams", parameters)
+ );
+ }
+
+ ///
+ /// Get Teams
+ ///
+ public List GetTeams()
+ {
+ return this.GetTeamsAsync().Result;
+ }
+
+ ///
+ /// Get Tournament Hierarchy Asynchronous
+ ///
+ /// Year of the season. Examples: 2015, 2016.
+ public Task GetTournamentAsync(string season)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("season", season.ToString()));
+ return Task.Run(() =>
+ base.Get("/cbb/v2/{format}/Tournament/{season}", parameters)
+ );
+ }
+
+ ///
+ /// Get Tournament Hierarchy
+ ///
+ /// Year of the season. Examples: 2015, 2016.
+ public Tournament GetTournament(string season)
+ {
+ return this.GetTournamentAsync(season).Result;
+ }
+
+ }
+}
+
diff --git a/FantasyData.Api.Client.NetCore/Clients/CBB/CBBv3Odds.cs b/FantasyData.Api.Client.NetCore/Clients/CBB/CBBv3Odds.cs
new file mode 100644
index 0000000..97ef7bb
--- /dev/null
+++ b/FantasyData.Api.Client.NetCore/Clients/CBB/CBBv3Odds.cs
@@ -0,0 +1,147 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using FantasyData.Api.Client.NetCore.Model.CBB;
+
+namespace FantasyData.Api.Client.NetCore
+{
+ public partial class CBBv3OddsClient : BaseClient
+ {
+ public CBBv3OddsClient(string apiKey) : base(apiKey) { }
+ public CBBv3OddsClient(Guid apiKey) : base(apiKey) { }
+
+ ///
+ /// Get In-Game Odds by Date Asynchronous
+ ///
+ /// The date of the game(s). Examples: 2018-11-20, 2018-11-23.
+ public Task> GetLiveGameOddsByDateAsync(string date)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("date", date.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/odds/{format}/LiveGameOddsByDate/{date}", parameters)
+ );
+ }
+
+ ///
+ /// Get In-Game Odds by Date
+ ///
+ /// The date of the game(s). Examples: 2018-11-20, 2018-11-23.
+ public List GetLiveGameOddsByDate(string date)
+ {
+ return this.GetLiveGameOddsByDateAsync(date).Result;
+ }
+
+ ///
+ /// Get In-Game Odds Line Movement Asynchronous
+ ///
+ /// The GameID of an CBB game. GameIDs can be found in the Games API. Valid entries are 17775 or 17776
+ public Task> GetLiveGameOddsLineMovementAsync(int gameid)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("gameid", gameid.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/odds/{format}/LiveGameOddsLineMovement/{gameid}", parameters)
+ );
+ }
+
+ ///
+ /// Get In-Game Odds Line Movement
+ ///
+ /// The GameID of an CBB game. GameIDs can be found in the Games API. Valid entries are 17775 or 17776
+ public List GetLiveGameOddsLineMovement(int gameid)
+ {
+ return this.GetLiveGameOddsLineMovementAsync(gameid).Result;
+ }
+
+ ///
+ /// Get Pre-Game Odds by Date Asynchronous
+ ///
+ /// The date of the game(s). Examples: 2018-11-20, 2018-11-23.
+ public Task> GetGameOddsByDateAsync(string date)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("date", date.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/odds/{format}/GameOddsByDate/{date}", parameters)
+ );
+ }
+
+ ///
+ /// Get Pre-Game Odds by Date
+ ///
+ /// The date of the game(s). Examples: 2018-11-20, 2018-11-23.
+ public List GetGameOddsByDate(string date)
+ {
+ return this.GetGameOddsByDateAsync(date).Result;
+ }
+
+ ///
+ /// Get Pre-Game Odds Line Movement Asynchronous
+ ///
+ /// The GameID of an CBB game. GameIDs can be found in the Games API. Valid entries are 17775 or 17776
+ public Task> GetGameOddsLineMovementAsync(int gameid)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("gameid", gameid.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/odds/{format}/GameOddsLineMovement/{gameid}", parameters)
+ );
+ }
+
+ ///
+ /// Get Pre-Game Odds Line Movement
+ ///
+ /// The GameID of an CBB game. GameIDs can be found in the Games API. Valid entries are 17775 or 17776
+ public List GetGameOddsLineMovement(int gameid)
+ {
+ return this.GetGameOddsLineMovementAsync(gameid).Result;
+ }
+
+ ///
+ /// Get Alternate Market Pre-Game Odds by Date Asynchronous
+ ///
+ /// The date of the game(s). Examples: 2018-11-20, 2018-11-23.
+ public Task> GetAlternateMarketGameOddsByDateAsync(string date)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("date", date.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/odds/{format}/AlternateMarketGameOddsByDate/{date}", parameters)
+ );
+ }
+
+ ///
+ /// Get Alternate Market Pre-Game Odds by Date
+ ///
+ /// The date of the game(s). Examples: 2018-11-20, 2018-11-23.
+ public List GetAlternateMarketGameOddsByDate(string date)
+ {
+ return this.GetAlternateMarketGameOddsByDateAsync(date).Result;
+ }
+
+ ///
+ /// Get Alternate Market Pre-Game Odds Line Movement Asynchronous
+ ///
+ /// The GameID of an CBB game. GameIDs can be found in the Games API. Valid entries are 17775 or 17776
+ public Task> GetAlternateMarketGameOddsLineMovementAsync(int gameid)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("gameid", gameid.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/odds/{format}/AlternateMarketGameOddsLineMovement/{gameid}", parameters)
+ );
+ }
+
+ ///
+ /// Get Alternate Market Pre-Game Odds Line Movement
+ ///
+ /// The GameID of an CBB game. GameIDs can be found in the Games API. Valid entries are 17775 or 17776
+ public List GetAlternateMarketGameOddsLineMovement(int gameid)
+ {
+ return this.GetAlternateMarketGameOddsLineMovementAsync(gameid).Result;
+ }
+
+ }
+}
+
diff --git a/FantasyData.Api.Client.NetCore/Clients/CBB/CBBv3Scores.cs b/FantasyData.Api.Client.NetCore/Clients/CBB/CBBv3Scores.cs
new file mode 100644
index 0000000..c4a0572
--- /dev/null
+++ b/FantasyData.Api.Client.NetCore/Clients/CBB/CBBv3Scores.cs
@@ -0,0 +1,283 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using FantasyData.Api.Client.NetCore.Model.CBB;
+
+namespace FantasyData.Api.Client.NetCore
+{
+ public partial class CBBv3ScoresClient : BaseClient
+ {
+ public CBBv3ScoresClient(string apiKey) : base(apiKey) { }
+ public CBBv3ScoresClient(Guid apiKey) : base(apiKey) { }
+
+ ///
+ /// Get Are Games In Progress Asynchronous
+ ///
+ public Task GetAreAnyGamesInProgressAsync()
+ {
+ var parameters = new List>();
+ return Task.Run(() =>
+ base.Get("/v3/cbb/scores/{format}/AreAnyGamesInProgress", parameters)
+ );
+ }
+
+ ///
+ /// Get Are Games In Progress
+ ///
+ public bool GetAreAnyGamesInProgress()
+ {
+ return this.GetAreAnyGamesInProgressAsync().Result;
+ }
+
+ ///
+ /// Get Current Season Asynchronous
+ ///
+ public Task GetCurrentSeasonAsync()
+ {
+ var parameters = new List>();
+ return Task.Run(() =>
+ base.Get("/v3/cbb/scores/{format}/CurrentSeason", parameters)
+ );
+ }
+
+ ///
+ /// Get Current Season
+ ///
+ public Season GetCurrentSeason()
+ {
+ return this.GetCurrentSeasonAsync().Result;
+ }
+
+ ///
+ /// Get Games by Date Asynchronous
+ ///
+ /// The date of the game(s). Examples: 2018-FEB-27, 2017-DEC-01.
+ public Task> GetGamesByDateAsync(string date)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("date", date.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/scores/{format}/GamesByDate/{date}", parameters)
+ );
+ }
+
+ ///
+ /// Get Games by Date
+ ///
+ /// The date of the game(s). Examples: 2018-FEB-27, 2017-DEC-01.
+ public List GetGamesByDate(string date)
+ {
+ return this.GetGamesByDateAsync(date).Result;
+ }
+
+ ///
+ /// Get League Hierarchy Asynchronous
+ ///
+ public Task> GetLeagueHierarchyAsync()
+ {
+ var parameters = new List>();
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/scores/{format}/LeagueHierarchy", parameters)
+ );
+ }
+
+ ///
+ /// Get League Hierarchy
+ ///
+ public List GetLeagueHierarchy()
+ {
+ return this.GetLeagueHierarchyAsync().Result;
+ }
+
+ ///
+ /// Get Player Details by Active Asynchronous
+ ///
+ public Task> GetPlayersAsync()
+ {
+ var parameters = new List>();
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/scores/{format}/Players", parameters)
+ );
+ }
+
+ ///
+ /// Get Player Details by Active
+ ///
+ public List GetPlayers()
+ {
+ return this.GetPlayersAsync().Result;
+ }
+
+ ///
+ /// Get Player Details by Player Asynchronous
+ ///
+ /// Unique FantasyData Player ID. Example:60003802.
+ public Task GetPlayerAsync(int playerid)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("playerid", playerid.ToString()));
+ return Task.Run(() =>
+ base.Get("/v3/cbb/scores/{format}/Player/{playerid}", parameters)
+ );
+ }
+
+ ///
+ /// Get Player Details by Player
+ ///
+ /// Unique FantasyData Player ID. Example:60003802.
+ public Player GetPlayer(int playerid)
+ {
+ return this.GetPlayerAsync(playerid).Result;
+ }
+
+ ///
+ /// Get Player Details by Team Asynchronous
+ ///
+ /// The abbreviation of the requested team. Examples: SF, NYY.
+ public Task> GetPlayersAsync(string team)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("team", team.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/scores/{format}/Players/{team}", parameters)
+ );
+ }
+
+ ///
+ /// Get Player Details by Team
+ ///
+ /// The abbreviation of the requested team. Examples: SF, NYY.
+ public List GetPlayers(string team)
+ {
+ return this.GetPlayersAsync(team).Result;
+ }
+
+ ///
+ /// Get Schedules Asynchronous
+ ///
+ /// Year of the season (with optional season type). Examples: 2018, 2018PRE, 2018POST, 2018STAR, 2019, etc.
+ public Task> GetGamesAsync(string season)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("season", season.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/scores/{format}/Games/{season}", parameters)
+ );
+ }
+
+ ///
+ /// Get Schedules
+ ///
+ /// Year of the season (with optional season type). Examples: 2018, 2018PRE, 2018POST, 2018STAR, 2019, etc.
+ public List GetGames(string season)
+ {
+ return this.GetGamesAsync(season).Result;
+ }
+
+ ///
+ /// Get Team Game Stats by Date Asynchronous
+ ///
+ /// The date of the game(s). Examples: 2018-FEB-27, 2017-DEC-01.
+ public Task> GetTeamGameStatsByDateAsync(string date)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("date", date.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/scores/{format}/TeamGameStatsByDate/{date}", parameters)
+ );
+ }
+
+ ///
+ /// Get Team Game Stats by Date
+ ///
+ /// The date of the game(s). Examples: 2018-FEB-27, 2017-DEC-01.
+ public List GetTeamGameStatsByDate(string date)
+ {
+ return this.GetTeamGameStatsByDateAsync(date).Result;
+ }
+
+ ///
+ /// Get Team Season Stats Asynchronous
+ ///
+ /// Year of the season (with optional season type). Examples: 2018, 2018POST, 2019.
+ public Task> GetTeamSeasonStatsAsync(string season)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("season", season.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/scores/{format}/TeamSeasonStats/{season}", parameters)
+ );
+ }
+
+ ///
+ /// Get Team Season Stats
+ ///
+ /// Year of the season (with optional season type). Examples: 2018, 2018POST, 2019.
+ public List GetTeamSeasonStats(string season)
+ {
+ return this.GetTeamSeasonStatsAsync(season).Result;
+ }
+
+ ///
+ /// Get Teams Asynchronous
+ ///
+ public Task> GetTeamsAsync()
+ {
+ var parameters = new List>();
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/scores/{format}/teams", parameters)
+ );
+ }
+
+ ///
+ /// Get Teams
+ ///
+ public List GetTeams()
+ {
+ return this.GetTeamsAsync().Result;
+ }
+
+ ///
+ /// Get Tournament Hierarchy Asynchronous
+ ///
+ /// Year of the season (with optional season type). Examples: 2018, 2018POST, 2019.
+ public Task GetTournamentAsync(string season)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("season", season.ToString()));
+ return Task.Run(() =>
+ base.Get("/v3/cbb/scores/{format}/Tournament/{season}", parameters)
+ );
+ }
+
+ ///
+ /// Get Tournament Hierarchy
+ ///
+ /// Year of the season (with optional season type). Examples: 2018, 2018POST, 2019.
+ public Tournament GetTournament(string season)
+ {
+ return this.GetTournamentAsync(season).Result;
+ }
+
+ ///
+ /// Get Stadiums Asynchronous
+ ///
+ public Task> GetStadiumsAsync()
+ {
+ var parameters = new List>();
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/scores/{format}/Stadiums", parameters)
+ );
+ }
+
+ ///
+ /// Get Stadiums
+ ///
+ public List GetStadiums()
+ {
+ return this.GetStadiumsAsync().Result;
+ }
+
+ }
+}
+
diff --git a/FantasyData.Api.Client.NetCore/Clients/CBB/CBBv3Stats.cs b/FantasyData.Api.Client.NetCore/Clients/CBB/CBBv3Stats.cs
new file mode 100644
index 0000000..341b292
--- /dev/null
+++ b/FantasyData.Api.Client.NetCore/Clients/CBB/CBBv3Stats.cs
@@ -0,0 +1,518 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using FantasyData.Api.Client.NetCore.Model.CBB;
+
+namespace FantasyData.Api.Client.NetCore
+{
+ public partial class CBBv3StatsClient : BaseClient
+ {
+ public CBBv3StatsClient(string apiKey) : base(apiKey) { }
+ public CBBv3StatsClient(Guid apiKey) : base(apiKey) { }
+
+ ///
+ /// Get Are Games In Progress Asynchronous
+ ///
+ public Task GetAreAnyGamesInProgressAsync()
+ {
+ var parameters = new List>();
+ return Task.Run(() =>
+ base.Get("/v3/cbb/stats/{format}/AreAnyGamesInProgress", parameters)
+ );
+ }
+
+ ///
+ /// Get Are Games In Progress
+ ///
+ public bool GetAreAnyGamesInProgress()
+ {
+ return this.GetAreAnyGamesInProgressAsync().Result;
+ }
+
+ ///
+ /// Get Box Score Asynchronous
+ ///
+ /// The GameID of an CBB game. GameIDs can be found in the Games API. Valid entries are 14620 or 16905
+ public Task GetBoxScoreAsync(int gameid)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("gameid", gameid.ToString()));
+ return Task.Run(() =>
+ base.Get("/v3/cbb/stats/{format}/BoxScore/{gameid}", parameters)
+ );
+ }
+
+ ///
+ /// Get Box Score
+ ///
+ /// The GameID of an CBB game. GameIDs can be found in the Games API. Valid entries are 14620 or 16905
+ public BoxScore GetBoxScore(int gameid)
+ {
+ return this.GetBoxScoreAsync(gameid).Result;
+ }
+
+ ///
+ /// Get Box Scores by Date Asynchronous
+ ///
+ /// The date of the game(s). Examples: 2018-FEB-27, 2017-DEC-01.
+ public Task> GetBoxScoresAsync(string date)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("date", date.ToString()));
+ return Task.Run>(() =>
+ base.Get>("/v3/cbb/stats/{format}/BoxScores/{date}", parameters)
+ );
+ }
+
+ ///
+ /// Get Box Scores by Date
+ ///
+ /// The date of the game(s). Examples: 2018-FEB-27, 2017-DEC-01.
+ public List GetBoxScores(string date)
+ {
+ return this.GetBoxScoresAsync(date).Result;
+ }
+
+ ///
+ /// Get Box Scores by Date Delta Asynchronous
+ ///
+ /// The date of the game(s). Examples: 2018-FEB-27, 2017-DEC-01.
+ /// Only returns player statistics that have changed in the last X minutes. You specify how many minutes in time to go back. Valid entries are: 1 or 2.
+ public Task> GetBoxScoresDeltaAsync(string date, string minutes)
+ {
+ var parameters = new List>();
+ parameters.Add(new KeyValuePair("date", date.ToString()));
+ parameters.Add(new KeyValuePair("minutes", minutes.ToString()));
+ return Task.Run