Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.64 KB

README.md

File metadata and controls

56 lines (40 loc) · 1.64 KB

Zendesk Elixir Library

Build Status Hex pm API Docs

This is an Elixir library for interacting with the Zendesk platform.

Installation

The package can be installed by adding zendesk to your list of dependencies in mix.exs:

def deps do
  [
    {:zendesk, "~> 0.1"}
  ]
end

Check Hex to make sure you're using an up-to-date version number.

Usage

You'll need a Zendesk user email and token to access the API (based on security recommendations from Zendesk, password authentication isn't supported).

config :zendesk, token: "asdf123", email: "[email protected]", subdomain: "mysubdomain"

Then, you can build and send requests.

# To stream all tickets, paginating behind the scenes:
Zendesk.Ticket.list()
|> Zendesk.stream!()
|> Stream.take(100)
|> Enum.to_list()

# To get a specific ticket by ID:
ticket = Zendesk.Ticket.show(123) |> Zendesk.request!()

# To get a specific user by ID:
user = Zendesk.User.show(123) |> Zendesk.request!()

See the list of modules for a list of the other types (Users, Tickets, Macros, etc) available.

Running Tests

To run tests:

$ mix test

Reporting Issues

Please report all issues on github.