Skip to content

levimatheri/NYTimes.NET

Repository files navigation

NYTimes.NET

Build Status

A .NET Core SDK for NYTimes APIs. Model and API configuration classes generated using OpenAPI Generator.

Installation

Usage

try
{
    var items = await new Api("<YOUR-API-KEY-HERE>")
        .TopStories.GetArticlesBySection("food");
    foreach (var item in items)
    {
        Console.WriteLine(item.ToJson());
    }
}
catch (ApiException aex)
{
    Console.WriteLine(aex.Message); 
}
catch (Exception ex)
{
    Console.WriteLine(ex);
}

Contributing

  • Sign up to NY Times Developer Portal and create an application to obtain an API Key
  • Fork and clone this repo and code away!