module Voog::API::Comments
Public Instance Methods
comment(article_id, id, params = {})
click to toggle source
Get a single comment for article
@see www.voog.com/developers/api/resources/comments#get_comment
# File lib/voog_api/api/comments.rb, line 19 def comment(article_id, id, params = {}) get "articles/#{article_id}/comments/#{id}", {query: params} end
comments(article_id, params = {})
click to toggle source
List article comments
@see www.voog.com/developers/api/resources/comments#get_comments
# File lib/voog_api/api/comments.rb, line 12 def comments(article_id, params = {}) paginate "articles/#{article_id}/comments", {query: params} end
create_comment(article_id, data)
click to toggle source
Create a comment
@see www.voog.com/developers/api/resources/comments#create_comment
# File lib/voog_api/api/comments.rb, line 26 def create_comment(article_id, data) post "articles/#{article_id}/comments", data end
delete_comment(article_id, id)
click to toggle source
Delete an article comment
@see www.voog.com/developers/api/resources/comments#remove_comment
# File lib/voog_api/api/comments.rb, line 40 def delete_comment(article_id, id) delete "articles/#{article_id}/comments/#{id}" end
delete_spam_comments(article_id)
click to toggle source
Delete all spam comment for article
@see www.voog.com/developers/api/resources/comments#delete_spam_comments
# File lib/voog_api/api/comments.rb, line 47 def delete_spam_comments(article_id) delete "articles/#{article_id}/comments/delete_spam" end
toggle_spam_comment(article_id, id)
click to toggle source
Toggle comment spam flag
@see www.voog.com/developers/api/resources/comments#toggle_spam_comment
# File lib/voog_api/api/comments.rb, line 33 def toggle_spam_comment(article_id, id) put "articles/#{article_id}/comments/#{id}/toggle_spam", nil end