public Task<string> UpdateCommentAsync(string accessToken, string commentId, Comment updatedComment) { IDictionary<string, string> parameters = GetInitializedParameterCollection(); parameters.Add(ReadmillConstants.AccessToken, accessToken); parameters.Add(CommentsClient.CommentId, commentId); WrappedComment wrappedUpdate = new WrappedComment(); wrappedUpdate.Comment = updatedComment; var commentUrl = commentsUriTemplates[CommentsUriTemplateType.SingleComment].BindByName(this.readmillBaseUri, parameters); return PutAsync<WrappedComment>(wrappedUpdate, commentUrl); }
public Task<string> PostReadingCommentAsync(string content) { if (!this.isOpen) throw new InvalidOperationException("Session Closed."); Comment comment = new Comment() { Content = content }; return client.PostReadingCommentAsync(this.accessToken, this.readingId, comment); }
public Task<string> PostHighlightCommentAsync(string accessToken, string highlightId, Comment comment) { IDictionary<string, string> parameters = GetInitializedParameterCollection(); parameters.Add(ReadmillConstants.AccessToken, accessToken); parameters.Add(HighlightsClient.HighlightId, highlightId); //Wrap in InternalHighlight var wrappedComment = new WrappedComment() { Comment = comment }; var commentUrl = highlightsUriTemplates[HighlightsUriTemplateType.HighlightComments].BindByName(this.readmillBaseUri, parameters); return PostAsync<WrappedComment>(wrappedComment, commentUrl); }