Hassie.NET.API.NewsAPI 1.0.2

A simple to use async library to retrieve news from News API; written in .NET Standard 1.1.

There is a newer version of this package available.
See the version list below for details.
Install-Package Hassie.NET.API.NewsAPI -Version 1.0.2
dotnet add package Hassie.NET.API.NewsAPI --version 1.0.2
<PackageReference Include="Hassie.NET.API.NewsAPI" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Hassie.NET.API.NewsAPI --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

NewsAPI.NET

NewsAPI.NET is a asynchronous API wrapper around News API. It is based on their new v2 API and is a work in progress. At the moment, only the top headlines endpoint has been implemented.
It is written in NET Standard 1.1.

NuGet

This library is available on NuGet, under the package name Hassie.NET.API.NewsAPI. The current version is 1.0.1.

Example usage

INewsClient newsClient = new ClientBuilder()
    {
        ApiKey = "Your API Key";
    };
INewsArticles articles = await newsClient.GetTopHeadlines(Category.TECHNOLOGY, Country.GB);
INewsArticle article = articles.Articles.ElementAt(4);
Console.WriteLine(article.Author);
Console.WriteLine(article.Description);
Console.WriteLine(article.ImageURL);
Console.WriteLine(article.PublishTime);
Console.WriteLine(article.SourceName);
Console.WriteLine(article.Title);
Console.WriteLine(article.URL);

License

Copyright ©2018 Hassie.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

NewsAPI.NET

NewsAPI.NET is a asynchronous API wrapper around News API. It is based on their new v2 API and is a work in progress. At the moment, only the top headlines endpoint has been implemented.
It is written in NET Standard 1.1.

NuGet

This library is available on NuGet, under the package name Hassie.NET.API.NewsAPI. The current version is 1.0.1.

Example usage

INewsClient newsClient = new ClientBuilder()
    {
        ApiKey = "Your API Key";
    };
INewsArticles articles = await newsClient.GetTopHeadlines(Category.TECHNOLOGY, Country.GB);
INewsArticle article = articles.Articles.ElementAt(4);
Console.WriteLine(article.Author);
Console.WriteLine(article.Description);
Console.WriteLine(article.ImageURL);
Console.WriteLine(article.PublishTime);
Console.WriteLine(article.SourceName);
Console.WriteLine(article.Title);
Console.WriteLine(article.URL);

License

Copyright ©2018 Hassie.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Release Notes

HTTP request exceptions now more meaningful - News API responses are now parsed and thrown.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.2.1 294 4/2/2018
2.2.0 307 2/11/2018
2.1.0 273 2/4/2018
2.0.1 230 2/3/2018
2.0.0 269 2/1/2018
1.0.2 258 1/27/2018
1.0.1 291 1/16/2018
1.0.0 327 1/16/2018
Show less