/// <summary> /// Позволяет вернуть ранее скрытый объект в ленту новостей. /// </summary> /// <returns> Возвращает результат выполнения метода. </returns> /// <param name="type"> Тип объекта. </param> /// <param name="ownerId"> /// Идентификатор владельца объекта (пользователь или /// сообщество). /// </param> /// <param name="itemId"> Идентификатор объекта. </param> /// <remarks> /// Страница документации ВКонтакте http://vk.com/dev/newsfeed.unignoreItem /// </remarks> public bool UnignoreItem(NewsObjectTypes type, long ownerId, long itemId) { var parameters = new VkParameters { { "type", type } , { "owner_id", ownerId } , { "item_id", itemId } }; return(_vk.Call(methodName: "newsfeed.unignoreItem", parameters: parameters)); }
public void NewsObjectTypesTest() { // get test Assert.That(NewsObjectTypes.Wall.ToString(), Is.EqualTo("wall")); Assert.That(NewsObjectTypes.Tag.ToString(), Is.EqualTo("tag")); Assert.That(NewsObjectTypes.ProfilePhoto.ToString(), Is.EqualTo("profilephoto")); Assert.That(NewsObjectTypes.Video.ToString(), Is.EqualTo("video")); Assert.That(NewsObjectTypes.Photo.ToString(), Is.EqualTo("photo")); Assert.That(NewsObjectTypes.Audio.ToString(), Is.EqualTo("audio")); // parse test Assert.That(NewsObjectTypes.FromJsonString("wall"), Is.EqualTo(NewsObjectTypes.Wall)); Assert.That(NewsObjectTypes.FromJsonString("tag"), Is.EqualTo(NewsObjectTypes.Tag)); Assert.That(NewsObjectTypes.FromJsonString("profilephoto"), Is.EqualTo(NewsObjectTypes.ProfilePhoto)); Assert.That(NewsObjectTypes.FromJsonString("video"), Is.EqualTo(NewsObjectTypes.Video)); Assert.That(NewsObjectTypes.FromJsonString("photo"), Is.EqualTo(NewsObjectTypes.Photo)); Assert.That(NewsObjectTypes.FromJsonString("audio"), Is.EqualTo(NewsObjectTypes.Audio)); }
public void NewsObjectTypesTest() { // get test Assert.That(actual: NewsObjectTypes.Wall.ToString(), expression: Is.EqualTo(expected: "wall")); Assert.That(actual: NewsObjectTypes.Tag.ToString(), expression: Is.EqualTo(expected: "tag")); Assert.That(actual: NewsObjectTypes.ProfilePhoto.ToString(), expression: Is.EqualTo(expected: "profilephoto")); Assert.That(actual: NewsObjectTypes.Video.ToString(), expression: Is.EqualTo(expected: "video")); Assert.That(actual: NewsObjectTypes.Photo.ToString(), expression: Is.EqualTo(expected: "photo")); Assert.That(actual: NewsObjectTypes.Audio.ToString(), expression: Is.EqualTo(expected: "audio")); // parse test Assert.That(actual: NewsObjectTypes.FromJsonString(response: "wall"), expression: Is.EqualTo(expected: NewsObjectTypes.Wall)); Assert.That(actual: NewsObjectTypes.FromJsonString(response: "tag"), expression: Is.EqualTo(expected: NewsObjectTypes.Tag)); Assert.That(actual: NewsObjectTypes.FromJsonString(response: "profilephoto") , expression: Is.EqualTo(expected: NewsObjectTypes.ProfilePhoto)); Assert.That(actual: NewsObjectTypes.FromJsonString(response: "video"), expression: Is.EqualTo(expected: NewsObjectTypes.Video)); Assert.That(actual: NewsObjectTypes.FromJsonString(response: "photo"), expression: Is.EqualTo(expected: NewsObjectTypes.Photo)); Assert.That(actual: NewsObjectTypes.FromJsonString(response: "audio"), expression: Is.EqualTo(expected: NewsObjectTypes.Audio)); }
public bool UnignoreItem(NewsObjectTypes type, long ownerId, ulong itemId) { var parameters = new VkParameters { { "type", type }, { "owner_id", ownerId }, { "item_id", itemId } }; return _vk.Call("newsfeed.unignoreItem", parameters); }
/// <inheritdoc /> public Task <bool> UnignoreItemAsync(NewsObjectTypes type, long ownerId, long itemId) { return(TypeHelper.TryInvokeMethodAsync(func: () => _vk.NewsFeed.UnignoreItem(type: type, ownerId: ownerId, itemId: itemId))); }
/// <inheritdoc /> public async Task <bool> IgnoreItemAsync(NewsObjectTypes type, long ownerId, long itemId) { return(await TypeHelper.TryInvokeMethodAsync(() => _vk.NewsFeed.IgnoreItem(type, ownerId, itemId))); }