C# Class FFN.FFN

A simple C# class to retrieve data from FantasyFootballNerd.com (FFN) Class is available free of charge, however you will need an API Key to return results. The class is intended to retrieve data from FFN, but please store the data locally to remain bandwidth-friendly.
显示文件 Open project: marcneuwirth/FantasyFootballNerdAPI.NET Class Usage Examples

Public Properties

Property Type Description
ErrorMessage string

Public Methods

Method Description
FFN ( string ApiKey ) : System

Constructor

GetDraftRankings ( string Position, string Limit, string SOS ) : DataTable

Get the current preseason draft rankings

GetInjuries ( string Week ) : DataTable

Get the current injury list

GetPlayerDetails ( string PlayerId, string &FirstName, string &LastName, string &Team, string &Position ) : DataTable

Get the Player Details of the requested Player

GetPlayers ( ) : DataTable

Returns the a DataTable with all of the NFL Players. This does not need to be called more than once per week as it doesn't change with much frequency.

GetSchedule ( string &Season, string &Timezone ) : DataTable

Returns the Schedule DataTable, the Season and the Timezone

GetSitStart ( string Week, string Position ) : DataTable

Gets the selected week's projections

Private Methods

Method Description
GetDataSet ( HttpWebRequest request ) : DataSet

Helper class to get FFN Xml from FFN

Method Details

FFN() public method

Constructor
public FFN ( string ApiKey ) : System
ApiKey string Your ApiKey
return System

GetDraftRankings() public method

Get the current preseason draft rankings
public GetDraftRankings ( string Position, string Limit, string SOS ) : DataTable
Position string The position to retrieve. Options: ALL, QB, RB, WR, TE, DEF, K
Limit string How many results to return. Pass an integer between 1 and 1000
SOS string Return the Strength of Schedule for every player? Pass a 1 for yes, 0 for no
return System.Data.DataTable

GetInjuries() public method

Get the current injury list
public GetInjuries ( string Week ) : DataTable
Week string The week number to retrieve injuries for (1-17)
return System.Data.DataTable

GetPlayerDetails() public method

Get the Player Details of the requested Player
public GetPlayerDetails ( string PlayerId, string &FirstName, string &LastName, string &Team, string &Position ) : DataTable
PlayerId string The Player Id of the requested Player
FirstName string The first name of the requested player
LastName string The last name of the requested player
Team string The team of the requested player
Position string The position of the requested player
return System.Data.DataTable

GetPlayers() public method

Returns the a DataTable with all of the NFL Players. This does not need to be called more than once per week as it doesn't change with much frequency.
public GetPlayers ( ) : DataTable
return System.Data.DataTable

GetSchedule() public method

Returns the Schedule DataTable, the Season and the Timezone
public GetSchedule ( string &Season, string &Timezone ) : DataTable
Season string The current season
Timezone string The timezone
return System.Data.DataTable

GetSitStart() public method

Gets the selected week's projections
public GetSitStart ( string Week, string Position ) : DataTable
Week string The week to return results for (1-17)
Position string The position to retrieve. Options: QB, RB, WR, TE, DEF, K
return System.Data.DataTable

Property Details

ErrorMessage public_oe property

Error Message - a holder for any error that we may encounter
public string ErrorMessage
return string