Полностью переписанное api
All checks were successful
Release / pack-and-publish (release) Successful in 36s
All checks were successful
Release / pack-and-publish (release) Successful in 36s
This commit is contained in:
@@ -1,24 +1,13 @@
|
||||
using System.Net;
|
||||
|
||||
using YandexMusic.API.Common;
|
||||
using YandexMusic.API.Models.Common;
|
||||
using YandexMusic.API.Models.Playlist;
|
||||
using YandexMusic.API.Requests.Common;
|
||||
using YandexMusic.API.Requests.Common.Attributes;
|
||||
|
||||
namespace YandexMusic.API.Requests.Playlist;
|
||||
|
||||
[YApiRequest(WebRequestMethods.Http.Get, "users/{uid}/playlists/list")]
|
||||
public class YGetPlaylistFavoritesBuilder : YRequestBuilder<YResponse<List<YPlaylist>>, object>
|
||||
public class YGetPlaylistFavoritesBuilder : YMusicRequestBuilder<List<YPlaylist>?, object>
|
||||
{
|
||||
public YGetPlaylistFavoritesBuilder(YandexMusicApi yandex, AuthStorage auth) : base(yandex, auth)
|
||||
{
|
||||
}
|
||||
|
||||
protected override Dictionary<string, string> GetSubstitutions(object tuple)
|
||||
{
|
||||
return new Dictionary<string, string> {
|
||||
{ "uid", storage.User.Uid }
|
||||
};
|
||||
}
|
||||
public YGetPlaylistFavoritesBuilder(YandexMusicApi api) : base(api) { }
|
||||
protected override string Method => WebRequestMethods.Http.Get;
|
||||
protected override string PathTemplate => "users/{uid}/playlists/list";
|
||||
protected override Dictionary<string, string> GetSubstitutions(object _)
|
||||
=> new() { { "uid", Api.Storage.User.Uid } };
|
||||
}
|
||||
Reference in New Issue
Block a user