This gem added support for Zendesk Help Center methods under ZendeskAPI::Client gem.
To experiment with that code, run bin/console
for an interactive prompt.
Add this line to your application's Gemfile:
gem 'zendesk_help_center_api'
And then execute:
$ bundle
Or install it yourself as:
$ gem install zendesk_help_center_api
require 'zendesk_api/help_center'
client = ZendeskAPI::Client.new do |config|
config.url = "<- your-zendesk-url ->" # e.g. https://mydesk.zendesk.com/api/v2
config.username = "login.email@zendesk.com"
config.password = "your zendesk password"
end
categories = client.hc_categories
category = categories.build(name: 'Test Category')
category.save
category.update(description: 'This is a test')
category.destroy
sections = category.sections
section = sections.first
category.update(name: 'This is a test')
articles = section.articles
articles.build(title: 'Test Article')
category.update(body: 'This is a test')
article.destroy
Translations represent the content in all supported languages of a Help Center
item such as an article
or a section
. The default language is also included in the translations.
categories_tr = category.translations
category_tr = categories_tr.build(locale: 'uk', title: 'Тестова Стаття', body: '')
category_tr.save
sections_tr = sections.translations
section_tr = article_tr.build(locale: 'uk', title: 'Це тест', body: '')
section_tr.save
articles_tr = article.translations
article_tr = article_translations.build(locale: 'uk', title: 'Тестова Стаття', body: '')
article_tr.save
After checking out the repo, run bin/setup
to install dependencies. Then, run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, run bundle exec rake release
to create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
- Fork it ( https://github.com/mamantoha/zendesk_help_center_api_client_rb/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Copyright: 2015-2017 Anton Maminov
This project is licensed under the Apache License, a copy of which can be found in the LICENSE file.