Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Ruby gem to interact with the Zendesk API

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 Manifest
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 geminstaller.yml
Octocat-spinner-32 zendesk-api.gemspec
README.markdown

Zendesk API

The unofficial Ruby Library for interacting with the Zendesk REST API

Documentation & Requirements

  • ActiveResource gem
  • Curl
  • Curb gem

What

  • Ruby wrapper around the Zendesk REST API

Install Instructions

Normal install: gem install zendesk-api

Bundler install: gem "zendesk-api", "latestversion"

How to use it

Basic

Below outputs xml z = Zendesk::Main.new('subdomain', 'username', 'password') and outputs json z = Zendesk::Main.new('subdomain', 'username', 'password', :format => 'json')

For the most part all functions is based on the following functions REST function_names = %{user, organization, group, ticket,attachement, tag, forum, entries, search}

Show

z.get_function_name(user_id)

e.g. z.get_user(121)

List

z.get_function_names #with a s in the end, for plural

e.g. z.get_users

Create

with string z.create_function_name("email@company.comJohn Doe") with hash(array is not supported yet) z.create_function_name({:email => 'email@company.com', :name => 'John Doe'})

Update

Not supported yet

Destroy

z.destroy_function_name(id)

e.g. z.destroy_user(234)

Using The Zendesk Console

The Zendesk library comes with a convenient console for testing and quick commands (or whatever else you want to use it for).

From /

irb -r lib/zendesk/console
z = Zendesk::Main.new('accountname', 'username', 'password')
z.get_users
Something went wrong with that request. Please try again.