Get by packageid and an api to search by title #2585
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR modifies the NuGet feed APIs and opens a new API to search for packages. Fixes #2575
This PR fixes the NuGet feed APIs and ported them to use V3 of the NuGet feed. It uses the title query parameter to get information about a requested package. The issue with the title query parameter is that it doesn't return exact results as intended. For example,
Returns results for
Azure.Storage.Blobs
. Likewise, if the title was replaced by id in the NuGet query endpoint it will behave the same.To solve this the
packageid
query parameter is the one that returns exact matches bypackageid
So, in this PR, the
getPackage
andgetLatestPackage
APIs now use thepackageid
in the search.The underlying HTTPS request would be like:
To make API more flexible, a new API was added
searchByTitle
which uses thetitle
query parameter in the search and returns more than one result, unlike the other two APIs which return one result only.