From bf4c48980f81e566065c07f3fe534ce7551ebdcc Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 29 Apr 2021 19:29:35 +0800 Subject: ... --- BackEnd/Timeline/Services/Api/ISearchService.cs | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 BackEnd/Timeline/Services/Api/ISearchService.cs (limited to 'BackEnd/Timeline/Services/Api/ISearchService.cs') diff --git a/BackEnd/Timeline/Services/Api/ISearchService.cs b/BackEnd/Timeline/Services/Api/ISearchService.cs new file mode 100644 index 00000000..d8b4bb44 --- /dev/null +++ b/BackEnd/Timeline/Services/Api/ISearchService.cs @@ -0,0 +1,33 @@ +using System; +using System.Threading.Tasks; +using Timeline.Entities; + +namespace Timeline.Services.Api +{ + public interface ISearchService + { + /// + /// Search timelines whose name or title contains query string. + /// + /// String to contain. + /// Search results. + /// Thrown when is null. + /// Thrown when is empty. + /// + /// Implementation should promise high score is at first. + /// + Task> SearchTimelineAsync(string query); + + /// + /// Search users whose username or nickname contains query string. + /// + /// String to contain. + /// Search results. + /// Thrown when is null. + /// Thrown when is empty. + /// + /// Implementation should promise high score is at first. + /// + Task> SearchUserAsync(string query); + } +} -- cgit v1.2.3