-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
2,720 additions
and
1,568 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
|
||
using Yandex.Music.Api.Common; | ||
using Yandex.Music.Api.Models.Album; | ||
using Yandex.Music.Api.Models.Common; | ||
using Yandex.Music.Api.Requests.Album; | ||
|
||
namespace Yandex.Music.Api.API | ||
{ | ||
/// <summary> | ||
/// API для взаимодействия с альбомами | ||
/// </summary> | ||
public partial class YAlbumAPI : YCommonAPI | ||
{ | ||
#region Основные функции | ||
|
||
public YAlbumAPI(YandexMusicApi yandex): base(yandex) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Получение альбома | ||
/// </summary> | ||
/// <param name="storage">Хранилище</param> | ||
/// <param name="albumId">Идентификатор</param> | ||
/// <returns></returns> | ||
public Task<YResponse<YAlbum>> GetAsync(AuthStorage storage, string albumId) | ||
{ | ||
return new YGetAlbumBuilder(api, storage) | ||
.Build(albumId) | ||
.GetResponseAsync(); | ||
} | ||
|
||
/// <summary> | ||
/// Получение альбомов по списку | ||
/// </summary> | ||
/// <param name="storage">Хранилище</param> | ||
/// <param name="albumIds">Идентификаторы альбомов</param> | ||
/// <returns></returns> | ||
public Task<YResponse<List<YAlbum>>> GetAsync(AuthStorage storage, IEnumerable<string> albumIds) | ||
{ | ||
return new YGetAlbumsBuilder(api, storage) | ||
.Build(albumIds) | ||
.GetResponseAsync(); | ||
} | ||
|
||
#endregion Основные функции | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
|
||
using Yandex.Music.Api.Common; | ||
using Yandex.Music.Api.Models.Artist; | ||
using Yandex.Music.Api.Models.Common; | ||
using Yandex.Music.Api.Requests.Artist; | ||
|
||
namespace Yandex.Music.Api.API | ||
{ | ||
/// <summary> | ||
/// API для взаимодействия с исполнителями | ||
/// </summary> | ||
public partial class YArtistAPI : YCommonAPI | ||
{ | ||
#region Основные функции | ||
|
||
public YArtistAPI(YandexMusicApi yandex): base(yandex) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Получение исполнителя | ||
/// </summary> | ||
/// <param name="storage">Хранилище</param> | ||
/// <param name="artistId">Идентификатор</param> | ||
/// <returns></returns> | ||
public Task<YResponse<YArtistBriefInfo>> GetAsync(AuthStorage storage, string artistId) | ||
{ | ||
return new YGetArtistBuilder(api, storage) | ||
.Build(artistId) | ||
.GetResponseAsync(); | ||
} | ||
|
||
/// <summary> | ||
/// Получение исполнителей | ||
/// </summary> | ||
/// <param name="storage">Хранилище</param> | ||
/// <param name="artistIds">Идентификаторы</param> | ||
/// <returns></returns> | ||
public Task<YResponse<List<YArtist>>> GetAsync(AuthStorage storage, IEnumerable<string> artistIds) | ||
{ | ||
return new YGetArtistsBuilder(api, storage) | ||
.Build(artistIds) | ||
.GetResponseAsync(); | ||
} | ||
|
||
#endregion Основные функции | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using System.Threading.Tasks; | ||
|
||
using Yandex.Music.Api.Common; | ||
using Yandex.Music.Api.Models.Common; | ||
using Yandex.Music.Api.Models.Feed; | ||
using Yandex.Music.Api.Models.Landing; | ||
using Yandex.Music.Api.Requests.Feed; | ||
using Yandex.Music.Api.Requests.Landing; | ||
|
||
namespace Yandex.Music.Api.API | ||
{ | ||
/// <summary> | ||
/// API для взаимодействия с главной страницей | ||
/// </summary> | ||
public partial class YLandingAPI: YCommonAPI | ||
{ | ||
#region Основные функции | ||
|
||
public YLandingAPI(YandexMusicApi yandex) : base(yandex) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Получение персональных списков | ||
/// </summary> | ||
/// <param name="storage">Хранилище</param> | ||
/// <param name="blocks">Типы запрашиваемых блоков</param> | ||
/// <returns></returns> | ||
public Task<YResponse<YLanding>> GetAsync(AuthStorage storage, params YLandingBlockType[] blocks) | ||
{ | ||
if (blocks == null) | ||
return null; | ||
|
||
return new YGetLandingBuilder(api, storage) | ||
.Build(blocks) | ||
.GetResponseAsync(); | ||
} | ||
|
||
/// <summary> | ||
/// Получение ленты | ||
/// </summary> | ||
/// <param name="storage">Хранилище</param> | ||
/// <returns></returns> | ||
public Task<YResponse<YFeed>> GetFeedAsync(AuthStorage storage) | ||
{ | ||
return new YGetFeedBuilder(api, storage) | ||
.Build(null) | ||
.GetResponseAsync(); | ||
} | ||
|
||
#endregion Основные функции | ||
} | ||
} |
Oops, something went wrong.