module KayakoClient::ArticleClient

Public Instance Methods

comments(options = {}) click to toggle source
# File lib/kayako_client/mixins/article_client.rb, line 43
def comments(options = {})
    KayakoClient::KnowledgebaseComment.all(kb_article_id, options.merge(inherited_options)) if kb_article_id
end
create_attachment(options = {})
Alias for: post_attachment
create_comment(options = {})
Alias for: post_comment
delete_attachment(attachment, options = {}) click to toggle source
# File lib/kayako_client/mixins/article_client.rb, line 36
def delete_attachment(attachment, options = {})
    KayakoClient::KnowledgebaseAttachment.delete(kb_article_id, attachment, options.merge(inherited_options)) if kb_article_id
end
Also aliased as: destroy_attachment
delete_comment(comment, options = {}) click to toggle source
# File lib/kayako_client/mixins/article_client.rb, line 68
def delete_comment(comment, options = {})
    article_comment = get_comment(comment, options.merge(inherited_options))
    article_comment.delete if article_comment
end
Also aliased as: destroy_comment
destroy_attachment(attachment, options = {})
Alias for: delete_attachment
destroy_comment(comment, options = {})
Alias for: delete_comment
find_attachment(attachment, options = {})
Alias for: get_attachment
find_comment(comment, options = {})
Alias for: get_comment
get_attachment(attachment, options = {}) click to toggle source
# File lib/kayako_client/mixins/article_client.rb, line 18
def get_attachment(attachment, options = {})
    KayakoClient::KnowledgebaseAttachment.get(kb_article_id, attachment, options.merge(inherited_options)) if kb_article_id
end
Also aliased as: find_attachment
get_comment(comment, options = {}) click to toggle source
# File lib/kayako_client/mixins/article_client.rb, line 47
def get_comment(comment, options = {})
    if kb_article_id
        value = KayakoClient::KnowledgebaseComment.get(comment, options.merge(inherited_options))
        value && value.kb_article_id == kb_article_id ? value : nil
    end
end
Also aliased as: find_comment
post_attachment(options = {}) click to toggle source
# File lib/kayako_client/mixins/article_client.rb, line 24
def post_attachment(options = {})
    if kb_article_id
        if logger && options[:kb_article_id] && options[:kb_article_id].to_i != kb_article_id
            logger.warn "overwriting :kb_article_id"
        end
        options[:kb_article_id] = kb_article_id
        KayakoClient::KnowledgebaseAttachment.post(options.merge(inherited_options))
    end
end
Also aliased as: create_attachment
post_comment(options = {}) click to toggle source
# File lib/kayako_client/mixins/article_client.rb, line 56
def post_comment(options = {})
    if kb_article_id
        if logger && options[:kb_article_id] && options[:kb_article_id].to_i != kb_article_id
            logger.warn "overwriting :kb_article_id"
        end
        options[:kb_article_id] = kb_article_id
        KayakoClient::KnowledgebaseComment.post(options.merge(inherited_options))
    end
end
Also aliased as: create_comment