Полностью переписанное 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,20 +1,13 @@
|
||||
using YandexMusic.API.Common;
|
||||
using YandexMusic.API.Models.Common;
|
||||
using YandexMusic.API.Models.Pins;
|
||||
using YandexMusic.API.Requests.Pins;
|
||||
|
||||
namespace YandexMusic.API;
|
||||
|
||||
/// <summary>API для взаимодействия с закреплёнными объектами (пинами).</summary>
|
||||
/// <summary>API для работы с закреплёнными объектами (пинами).</summary>
|
||||
public class YPinsAPI : YCommonAPI
|
||||
{
|
||||
/// <summary>Инициализирует новый экземпляр API пинов.</summary>
|
||||
/// <param name="yandex">Экземпляр основного API.</param>
|
||||
public YPinsAPI(YandexMusicApi yandex) : base(yandex) { }
|
||||
public YPinsAPI(YandexMusicApi api) : base(api) { }
|
||||
|
||||
/// <summary>Получает список закреплённых объектов.</summary>
|
||||
/// <param name="storage">Хранилище авторизации.</param>
|
||||
/// <returns>Ответ API со списком пинов.</returns>
|
||||
public Task<YResponse<YPins>> GetAsync(AuthStorage storage)
|
||||
=> new YGetPinsBuilder(api, storage).Build(null!).GetResponseAsync();
|
||||
public Task<YPins?> GetAsync()
|
||||
=> new YGetPinsBuilder(Api).ExecuteAsync(null!);
|
||||
}
|
||||
Reference in New Issue
Block a user