From 5977db87a6dcb2f37f68505cf0831cc15bb0facd Mon Sep 17 00:00:00 2001 From: Alexnader Rakhov Date: Mon, 28 Aug 2023 19:10:44 +0300 Subject: [PATCH] Added is_hidden field to market.addalbum --- VkNet/Abstractions/Category/Async/IMarketsCategoryAsync.cs | 4 ++++ VkNet/Abstractions/Category/IMarketsCategory.cs | 2 +- VkNet/Categories/Async/MarketsCategoryAsync.cs | 3 ++- VkNet/Categories/MarketsCategory.cs | 5 ++++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/VkNet/Abstractions/Category/Async/IMarketsCategoryAsync.cs b/VkNet/Abstractions/Category/Async/IMarketsCategoryAsync.cs index 637e0761f..167e26b5c 100644 --- a/VkNet/Abstractions/Category/Async/IMarketsCategoryAsync.cs +++ b/VkNet/Abstractions/Category/Async/IMarketsCategoryAsync.cs @@ -564,6 +564,9 @@ Task ReorderAlbumsAsync(long ownerId, /// значения 1 или 0 /// (флаг, может принимать значения 1 или 0). /// + /// + /// Информация о том, сделать ли подборку скрытой. 0 - не делать скрытой(по умолчанию). 1 - скрыть подборку + /// /// Токен отмены операции /// /// После успешного выполнения возвращает идентификатор созданной подборки. @@ -575,6 +578,7 @@ Task AddAlbumAsync(long ownerId, string title, long? photoId = null, bool mainAlbum = false, + bool isHidden = false, CancellationToken token = default); /// diff --git a/VkNet/Abstractions/Category/IMarketsCategory.cs b/VkNet/Abstractions/Category/IMarketsCategory.cs index 926bd4e77..75acd21d1 100644 --- a/VkNet/Abstractions/Category/IMarketsCategory.cs +++ b/VkNet/Abstractions/Category/IMarketsCategory.cs @@ -66,7 +66,7 @@ public interface IMarketsCategory : IMarketsCategoryAsync bool ReorderAlbums(long ownerId, long albumId, long? before = null, long? after = null); /// - long AddAlbum(long ownerId, string title, long? photoId = null, bool mainAlbum = false); + long AddAlbum(long ownerId, string title, long? photoId = null, bool mainAlbum = false, bool isHidden = false); /// bool EditAlbum(long ownerId, long albumId, string title, long? photoId = null, bool mainAlbum = false, bool isHidden = false); diff --git a/VkNet/Categories/Async/MarketsCategoryAsync.cs b/VkNet/Categories/Async/MarketsCategoryAsync.cs index 9e4877cc3..19b0ecef7 100644 --- a/VkNet/Categories/Async/MarketsCategoryAsync.cs +++ b/VkNet/Categories/Async/MarketsCategoryAsync.cs @@ -155,9 +155,10 @@ public Task AddAlbumAsync(long ownerId, string title, long? photoId = null, bool mainAlbum = false, + bool isHidden = false, CancellationToken token = default) => TypeHelper.TryInvokeMethodAsync(() => - AddAlbum(ownerId, title, photoId, mainAlbum), token); + AddAlbum(ownerId, title, photoId, mainAlbum, isHidden), token); /// public Task EditAlbumAsync(long ownerId, diff --git a/VkNet/Categories/MarketsCategory.cs b/VkNet/Categories/MarketsCategory.cs index 44fd4f6ea..177376de6 100644 --- a/VkNet/Categories/MarketsCategory.cs +++ b/VkNet/Categories/MarketsCategory.cs @@ -518,7 +518,7 @@ public bool ReorderAlbums(long ownerId, long albumId, long? before = null, long? } /// - public long AddAlbum(long ownerId, string title, long? photoId = null, bool mainAlbum = false) + public long AddAlbum(long ownerId, string title, long? photoId = null, bool mainAlbum = false, bool isHidden = false) { var parameters = new VkParameters { @@ -533,6 +533,9 @@ public long AddAlbum(long ownerId, string title, long? photoId = null, bool main }, { "main_album", mainAlbum + }, + { + "is_hidden", isHidden } };