View Source Zendesk Elixir Library
This is an Elixir library for interacting with the Zendesk platform.
installation
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
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: "someuser@example.com", 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
Running Tests
To run tests:
$ mix test
reporting-issues
Reporting Issues
Please report all issues on github.