Skip to content

Latest commit

 

History

History
79 lines (59 loc) · 2.39 KB

RankingsApi.md

File metadata and controls

79 lines (59 loc) · 2.39 KB

CFBSharp.Api.RankingsApi

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

Method HTTP request Description
GetRankings GET /rankings Historical polls and rankings

GetRankings

ICollection GetRankings (int? year, int? week = null, string seasonType = null)

Historical polls and rankings

Poll rankings

Example

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

namespace Example
{
    public class GetRankingsExample
    {
        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 RankingsApi();
            var year = 56;  // int? | Year/season filter for games
            var week = 56;  // int? | Week filter (optional) 
            var seasonType = seasonType_example;  // string | Season type filter (regular or postseason) (optional)  (default to regular)

            try
            {
                // Historical polls and rankings
                ICollection<RankingWeek> result = apiInstance.GetRankings(year, week, seasonType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RankingsApi.GetRankings: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
year int? Year/season filter for games
week int? Week filter [optional]
seasonType string Season type filter (regular or postseason) [optional] [default to regular]

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]