forked from loic-sharma/BaGet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Search] Refactor implementation (loic-sharma#562)
Improves the search services: 1. Introduces request models to reduce number of parameters 1. Plumbs additional search parameters to the autocomplete endpoint 1. Adds `packageType` property to the search response model 1. Removes unneeded default values on search services
- Loading branch information
1 parent
fa76475
commit 7c514bf
Showing
16 changed files
with
322 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
namespace BaGet.Core | ||
{ | ||
/// <summary> | ||
/// The NuGet V3 search request. | ||
/// See: https://docs.microsoft.com/en-us/nuget/api/search-autocomplete-service-resource#request-parameters | ||
/// </summary> | ||
public class AutocompleteRequest | ||
{ | ||
/// <summary> | ||
/// The number of results to skip, for pagination. | ||
/// </summary> | ||
public int Skip { get; set; } | ||
|
||
/// <summary> | ||
/// The number of results to return, for pagination. | ||
/// </summary> | ||
public int Take { get; set; } | ||
|
||
/// <summary> | ||
/// Whether to include pre-release packages. | ||
/// </summary> | ||
public bool IncludePrerelease { get; set; } | ||
|
||
/// <summary> | ||
/// Whether to include SemVer 2.0.0 compatible packages. | ||
/// </summary> | ||
public bool IncludeSemVer2 { get; set; } | ||
|
||
/// <summary> | ||
/// Filter results to a package type. If null, no filter is applied. | ||
/// </summary> | ||
public string PackageType { get; set; } | ||
|
||
/// <summary> | ||
/// The search query. | ||
/// </summary> | ||
public string Query { get; set; } | ||
} | ||
} |
Oops, something went wrong.