private async void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) { if (PrimaryBtnText == "Save") { try { if (!await PocketHandler.Client.ReplaceTags(PocketHandler.CurrentPocketItem, ChipsList.SelectedChips.ToArray()) .ConfigureAwait(true)) { return; } NotificationHandler.InAppNotification("Tags get updated", 2000); PocketHandler.CurrentPocketItem.Tags = ChipsList.SelectedChips.Select(chip => new PocketTag { Name = chip }); Hide(); } catch { } return; } try { var foo = PocketHandler.Client.Add(new Uri(UrlTextBox.Text.Trim()), ChipsList.SelectedChips.ToArray()); PocketItem = await foo.ConfigureAwait(true); Hide(); } catch { } }
public Task<bool> Unarchive(PocketItem item, CancellationToken cancellationToken = new CancellationToken()) { throw new NotImplementedException(); }
public Task<bool> ReplaceTags(PocketItem item, string[] tags, CancellationToken cancellationToken = new CancellationToken()) { throw new NotImplementedException(); }
public Task<bool> RenameTag(PocketItem item, string oldTag, string newTag, CancellationToken cancellationToken = new CancellationToken()) { throw new NotImplementedException(); }
public Task<bool> RemoveTags(PocketItem item, CancellationToken cancellationToken = new CancellationToken()) { throw new NotImplementedException(); }
/// <summary> /// Unarchives the specified item. /// </summary> /// <param name="item">The item.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns></returns> /// <exception cref="PocketException"></exception> public async Task<bool> Unarchive(PocketItem item, CancellationToken cancellationToken = default(CancellationToken)) { return await Unarchive(item.ID, cancellationToken); }
/// <summary> /// Removes a tag from an item. /// </summary> /// <param name="item">The item.</param> /// <param name="tag">The tag.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns></returns> /// <exception cref="PocketException"></exception> public async Task<bool> RemoveTag(PocketItem item, string tag, CancellationToken cancellationToken = default(CancellationToken)) { return await RemoveTag(item.ID, tag, cancellationToken); }
/// <summary> /// Adds the specified tags to an item. /// </summary> /// <param name="item">The item.</param> /// <param name="tags">The tags.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns></returns> /// <exception cref="PocketException"></exception> public async Task<bool> AddTags(PocketItem item, string[] tags, CancellationToken cancellationToken = default(CancellationToken)) { return await AddTags(item.ID, tags, cancellationToken); }
/// <summary> /// Renames a tag in an item. /// </summary> /// <param name="item">The item.</param> /// <param name="oldTag">The old tag.</param> /// <param name="newTag">The new tag name.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns></returns> /// <exception cref="PocketException"></exception> public async Task<bool> RenameTag(PocketItem item, string oldTag, string newTag, CancellationToken cancellationToken = default(CancellationToken)) { return await RenameTag(item.ID, oldTag, newTag, cancellationToken); }