-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathICards.cs
More file actions
51 lines (44 loc) · 1.55 KB
/
Copy pathICards.cs
File metadata and controls
51 lines (44 loc) · 1.55 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using ScryfallApi.Client.Models;
using static ScryfallApi.Client.Models.SearchOptions;
namespace ScryfallApi.Client.Apis;
/// <summary>
/// APIs for cards. Card objects represent individual Magic: The Gathering cards that players could
/// obtain and add to their collection (with a few minor exceptions).
/// </summary>
public interface ICards
{
/// <summary>
/// Fetch a card at random.
/// </summary>
/// <returns></returns>
Task<Card> GetRandom();
/// <summary>
/// Get a page worth of cards
/// </summary>
/// <param name="page"></param>
/// <returns></returns>
Task<ResultList<Card>> Get(int page);
/// <summary>
/// Search for exactly one card of the given name. Search parameters can be either exact or fuzzy.
/// </summary>
/// <param name="cardname"></param>
/// <param name="fuzzySearch"></param>
/// <returns></returns>
Task<Card> Named(string cardname, bool fuzzySearch);
/// <summary>
/// Search for cards with a sort option
/// </summary>
/// <param name="query"></param>
/// <param name="page"></param>
/// <param name="sort"></param>
/// <returns></returns>
Task<ResultList<Card>> Search(string query, int page, CardSort sort);
/// <summary>
/// Search for cards using the full search options available
/// </summary>
/// <param name="query"></param>
/// <param name="page"></param>
/// <param name="options"></param>
/// <returns></returns>
Task<ResultList<Card>> Search(string query, int page, SearchOptions options);
}