Skip to content

Latest commit

 

History

History
47 lines (42 loc) · 3.11 KB

README.md

File metadata and controls

47 lines (42 loc) · 3.11 KB

fantasydata-api-csharp

SportsDataIO API client (formerly branded as FantasyData) library wrapper for C# (.NET 4.5). For more information on the SportsDataIO API check the SportsDataIO Developer Portal.

Installation

This library is distributed on Nuget. In order to add to your visual studio project, open the nuget package manager console and use the command:

PM> Install-Package FantasyData.Api.Client

Authentication

You can find your API keys in the SportsDataIO API Documentation. See Usage for implementation details.

Usage

In this simple example we authenticate the and MLBv3Projections client with its respective key. We then pull projections for 2018-03-29 and just output some information to the console. Be sure to replace <license key> with your API key for this client.

// Connect to client and get data
var client = new MLBv3ProjectionsClient("<license key>");
var projections = client.GetPlayerGameProjectionStatsByDate("2018-03-29").OrderByDescending(p => p.DraftKingsSalary).Take(20).ToList();
// Write data to console
foreach(var projection in projections)
{
    Console.WriteLine($"{projection.PlayerID} - {projection.Name} ({projection.DraftKingsPosition}) DraftKings Salary: {projection.DraftKingsSalary}");
}

Documentation

API Documentation
NFL API
MLB API
NBA API
NHL API
NCAA Football API
NCAA Basketball API
PGA / Golf API
NASCAR API
Soccer API
UFC / MMA API
WNBA API
NCAA Women's Basketball API
Tennis API
LoL API
CS:GO API