A .NET Core SDK for NYTimes APIs. Model and API configuration classes generated using OpenAPI Generator.
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);
}
- Sign up to NY Times Developer Portal and create an application to obtain an API Key
- Fork and clone this repo and code away!