2020-05-04 22:02:53 +01:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
namespace SpotifyAPI.Web
|
|
|
|
{
|
|
|
|
public class FollowRequest : RequestParams
|
|
|
|
{
|
2020-05-28 15:30:17 +01:00
|
|
|
/// <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>
|
2020-05-05 14:30:00 +01:00
|
|
|
public FollowRequest(Type type, IList<string> ids)
|
|
|
|
{
|
|
|
|
Ensure.ArgumentNotNull(type, nameof(type));
|
|
|
|
Ensure.ArgumentNotNullOrEmptyList(ids, nameof(ids));
|
|
|
|
|
|
|
|
TypeParam = type;
|
|
|
|
Ids = ids;
|
|
|
|
}
|
|
|
|
|
2020-05-28 15:30:17 +01:00
|
|
|
/// <summary>
|
|
|
|
/// The ID type: either artist or user.
|
|
|
|
/// </summary>
|
|
|
|
/// <value></value>
|
2020-05-04 22:02:53 +01:00
|
|
|
[QueryParam("type")]
|
2020-05-05 04:45:33 +01:00
|
|
|
public Type? TypeParam { get; set; }
|
2020-05-04 22:02:53 +01:00
|
|
|
|
2020-05-28 15:30:17 +01:00
|
|
|
/// <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>
|
2020-05-04 22:02:53 +01:00
|
|
|
[BodyParam("ids")]
|
2020-05-05 14:30:00 +01:00
|
|
|
public IList<string> Ids { get; }
|
2020-05-04 22:02:53 +01:00
|
|
|
|
2020-05-05 04:45:33 +01:00
|
|
|
public enum Type
|
2020-05-04 22:02:53 +01:00
|
|
|
{
|
|
|
|
[String("artist")]
|
|
|
|
Artist,
|
|
|
|
[String("user")]
|
|
|
|
User
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-05-25 17:00:38 +01:00
|
|
|
|