module KayakoClient::NewsClient
Public Instance Methods
comments(options = {})
click to toggle source
# File lib/kayako_client/mixins/news_client.rb, line 18 def comments(options = {}) KayakoClient::NewsComment.all(id, options.merge(inherited_options)) if id end
delete_comment(comment, options = {})
click to toggle source
# File lib/kayako_client/mixins/news_client.rb, line 43 def delete_comment(comment, options = {}) news_comment = get_comment(comment, options.merge(inherited_options)) news_comment.delete if news_comment end
Also aliased as: destroy_comment
get_comment(comment, options = {})
click to toggle source
# File lib/kayako_client/mixins/news_client.rb, line 22 def get_comment(comment, options = {}) if id value = KayakoClient::NewsComment.get(comment, options.merge(inherited_options)) value && value.news_item_id == id ? value : nil end end
Also aliased as: find_comment
post_comment(options = {})
click to toggle source
# File lib/kayako_client/mixins/news_client.rb, line 31 def post_comment(options = {}) if id if logger && options[:news_item_id] && options[:news_item_id].to_i != id logger.warn "overwriting :news_item_id" end options[:news_item_id] = id KayakoClient::NewsComment.post(options.merge(inherited_options)) end end
Also aliased as: create_comment