Zendesk REST API client for Elixir
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
lib
spec
.gitignore
.travis.yml
LICENSE
README.md
mix.exs
mix.lock

README.md

zen_ex Build Status

Zendesk REST API client for Elixir

zen_ex is composed of Models and Entities. See Usage.

Installation

Add zen_ex to your list of dependencies in mix.exs:

def deps do
  [{:zen_ex, "~> 0.3.0"}]
end

Update your dependencies:

% mix deps.get

Add your Zendesk settings to your config:

config :zen_ex,
  subdomain: "your-zendesk-subdomain",
  user: "otoyo@otoyo.com",
  api_token: "xxxx"

See also: Generating a new API token

Usage

# List users
users = ZenEx.Model.User.list.entities

# Show user
user = ZenEx.Model.User.show(1)

# Create user
user = ZenEx.Model.User.create(%ZenEx.Entity.User{name: "otoyo", email: "otoyo@otoyo.com"})

# List tickets
collection = ZenEx.Model.Ticket.list(per_page: 100, sort_order: "desc")
tickets = collection.entities
next_tickets = collection |> ZenEx.Collection.next

# Show ticket
ticket = ZenEx.Model.Ticket.show(1)

# Create ticket
ticket = ZenEx.Model.Ticket.create(%ZenEx.Entity.Ticket{subject: "My printer is on fire!", description: "But no problem."})

See also under ZenEx.Model.

Supported API

Core API

  • Users
    • list
    • show
    • create
    • update
    • create_or_update
    • destroy
    • create_many
    • update_many
    • create_or_update_many
    • destroy_many
  • Tickets
    • list
    • show
    • create
    • update
    • destroy
    • create_many
    • update_many
    • destroy_many
  • Dynamic contents
    • list
    • show
    • create
    • update
    • destroy
  • Variants of dynamic contents
    • list
    • show
    • create
    • create_many
    • update
    • update_many
    • destroy
  • Locales
    • show
  • Job statuses
    • list
    • show
    • show_many

Help Center API

  • Categories
    • list
    • show
    • create
    • update
    • destroy
  • Sections
    • list
    • show
    • create
    • update
    • destroy
  • Articles
    • list
    • show
    • create
    • update
    • search
    • destroy
  • Translations
    • list
    • list_missing
    • show
    • create
    • update
    • destroy

Contributing

Contributions are welcome ;)

LICENSE

ZenEx is released under CC0-1.0 (see LICENSE).