Skip to content

Commit

Permalink
Version 2.2.1
Browse files Browse the repository at this point in the history
Fixed bug when adding a search query using the query builder.
  • Loading branch information
hassie-dash committed Apr 2, 2018
1 parent 11dae49 commit 2e80db6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Hassie.API.NewsAPI/API/v2/EverythingBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public EverythingBuilder Build()

if (mSearchQuery != null)
{
query.Add("query", mSearchQuery);
query.Add("q", mSearchQuery.Replace(" ", "%20"));
}

if (mSortOrder != null)
Expand Down
2 changes: 1 addition & 1 deletion Hassie.API.NewsAPI/API/v2/TopHeadlinesBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public TopHeadlinesBuilder Build()

if (mSearchQuery != null)
{
query.Add("query", mSearchQuery.Replace(" ", "%20"));
query.Add("q", mSearchQuery.Replace(" ", "%20"));
}

if (mSources != null)
Expand Down
11 changes: 7 additions & 4 deletions Hassie.API.NewsAPI/Hassie.NET.API.NewsAPI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
<PackageLicenseUrl>https://github.com/hassie-dash/NewsAPI.NET/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/hassie-dash/NewsAPI.NET</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes>Version 2.2.0
<PackageReleaseNotes>Version 2.2.1
* Fixed bug when adding a search query with a query builder.

Version 2.2.0
* Implemented Everything endpoint. Note that for the query parameter, you must provide the query in URL encoded format.

Version 2.1.0
Expand All @@ -27,12 +30,12 @@ Version 2.0.0
* Please refer to documentation to see the updated example usages.</PackageReleaseNotes>
<PackageTags>news;api;hassie;hassie-dash</PackageTags>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<AssemblyVersion>2.2.0.0</AssemblyVersion>
<AssemblyVersion>2.2.1.0</AssemblyVersion>
<NeutralLanguage>en-GB</NeutralLanguage>
<Title>NewsAPI.NET</Title>
<Description>A simple to use async library to retrieve news from News API; written in .NET Standard 1.1.</Description>
<Version>2.2.0</Version>
<FileVersion>2.2.0.0</FileVersion>
<Version>2.2.1</Version>
<FileVersion>2.2.1.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ NewsAPI.NET is a asynchronous API wrapper around News API. It is based on their

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

Example usage
-------------
Expand Down

0 comments on commit 2e80db6

Please sign in to comment.