delete tag action
This commit is contained in:
@@ -119,6 +119,23 @@ namespace PocketSharp
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a tag. This will remove it from all affected items too.
|
||||
/// </summary>
|
||||
/// <param name="tag">The tag.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="PocketException"></exception>
|
||||
public async Task<bool> DeleteTag(string tag, CancellationToken cancellationToken = default(CancellationToken))
|
||||
{
|
||||
return await Send(new PocketAction()
|
||||
{
|
||||
Action = "tag_delete",
|
||||
Tag = tag
|
||||
}, cancellationToken);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Replaces all existing tags with the given tags in an item.
|
||||
/// </summary>
|
||||
|
||||
@@ -413,6 +413,15 @@ namespace PocketSharp
|
||||
/// <exception cref="PocketException"></exception>
|
||||
Task<bool> RemoveTags(PocketItem item, CancellationToken cancellationToken = default(CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a tag. This will remove it from all affected items too.
|
||||
/// </summary>
|
||||
/// <param name="tag">The tag.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="PocketException"></exception>
|
||||
Task<bool> DeleteTag(string tag, CancellationToken cancellationToken = default(CancellationToken))
|
||||
|
||||
/// <summary>
|
||||
/// Replaces all existing tags with the given tags in an item.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
@@ -94,6 +94,15 @@ namespace PocketSharp.Models
|
||||
[DataMember(Name = "new_tag")]
|
||||
public string NewTag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the tag.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The old tag.
|
||||
/// </value>
|
||||
[DataMember(Name = "tag")]
|
||||
public string Tag { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Converts this instance to a parameter list.
|
||||
@@ -116,6 +125,8 @@ namespace PocketSharp.Models
|
||||
parameters.Add("old_tag", OldTag);
|
||||
if (NewTag != null)
|
||||
parameters.Add("new_tag", NewTag);
|
||||
if (Tag != null)
|
||||
parameters.Add("tag", Tag);
|
||||
if (!String.IsNullOrEmpty(Title))
|
||||
parameters.Add("title", Title);
|
||||
if (!String.IsNullOrEmpty(TweetID))
|
||||
|
||||
Reference in New Issue
Block a user