blob: d8b4bb44f429613eae3bab52d1ff1eea0f265edb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
using System;
using System.Threading.Tasks;
using Timeline.Entities;
namespace Timeline.Services.Api
{
public interface ISearchService
{
/// <summary>
/// Search timelines whose name or title contains query string.
/// </summary>
/// <param name="query">String to contain.</param>
/// <returns>Search results.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="query"/> is null.</exception>
/// <exception cref="ArgumentException">Thrown when <paramref name="query"/> is empty.</exception>
/// <remarks>
/// Implementation should promise high score is at first.
/// </remarks>
Task<SearchResult<TimelineEntity>> SearchTimelineAsync(string query);
/// <summary>
/// Search users whose username or nickname contains query string.
/// </summary>
/// <param name="query">String to contain.</param>
/// <returns>Search results.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="query"/> is null.</exception>
/// <exception cref="ArgumentException">Thrown when <paramref name="query"/> is empty.</exception>
/// <remarks>
/// Implementation should promise high score is at first.
/// </remarks>
Task<SearchResult<UserEntity>> SearchUserAsync(string query);
}
}
|