forked from JohnnyCrazy/SpotifyAPI-NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFollowRequest.cs
More file actions
50 lines (44 loc) · 1.26 KB
/
FollowRequest.cs
File metadata and controls
50 lines (44 loc) · 1.26 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
using System.Collections.Generic;
namespace SpotifyAPI.Web
{
public class FollowRequest : RequestParams
{
/// <summary>
///
/// </summary>
/// <param name="type">The ID type: either artist or user.</param>
/// <param name="ids">
/// A comma-separated list of the artist or the user Spotify IDs.
/// For example: ids=74ASZWbe4lXaubB36ztrGX,08td7MxkoHQkXnWAYD8d6Q.
/// A maximum of 50 IDs can be sent in one request.
/// </param>
public FollowRequest(Type type, IList<string> ids)
{
Ensure.ArgumentNotNull(type, nameof(type));
Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids));
TypeParam = type;
Ids = ids;
}
/// <summary>
/// The ID type: either artist or user.
/// </summary>
/// <value></value>
[QueryParam("type")]
public Type? TypeParam { get; set; }
/// <summary>
/// A comma-separated list of the artist or the user Spotify IDs.
/// For example: ids=74ASZWbe4lXaubB36ztrGX,08td7MxkoHQkXnWAYD8d6Q.
/// A maximum of 50 IDs can be sent in one request.
/// </summary>
/// <value></value>
[BodyParam("ids")]
public IList<string> Ids { get; }
public enum Type
{
[String("artist")]
Artist,
[String("user")]
User
}
}
}