forked from JohnnyCrazy/SpotifyAPI-NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSearchRequest.cs
More file actions
59 lines (49 loc) · 1.17 KB
/
Copy pathSearchRequest.cs
File metadata and controls
59 lines (49 loc) · 1.17 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
52
53
54
55
56
57
58
59
using System;
namespace SpotifyAPI.Web
{
public class SearchRequest : RequestParams
{
public SearchRequest(Types type, string query)
{
Ensure.ArgumentNotNull(type, nameof(type));
Ensure.ArgumentNotNullOrEmptyString(query, nameof(query));
Type = type;
Query = query;
}
[QueryParam("type")]
public Types Type { get; set; }
[QueryParam("q")]
public string Query { get; set; }
[QueryParam("market")]
public string Market { get; set; }
[QueryParam("limit")]
public int? Limit { get; set; }
[QueryParam("offset")]
public int? Offset { get; set; }
[QueryParam("include_external")]
public IncludeExternals? IncludeExternal { get; set; }
[Flags]
public enum IncludeExternals
{
[String("audio")]
Audio = 1,
}
[Flags]
public enum Types
{
[String("album")]
Album = 1,
[String("artist")]
Artist = 2,
[String("playlist")]
Playlist = 4,
[String("track")]
Track = 8,
[String("show")]
Show = 16,
[String("episode")]
Episode = 32,
All = Album | Artist | Playlist | Track | Show | Episode
}
}
}