Zendex
An Elixir wrapper for the Zendesk API.
Installation
-
Add
zendexto your list of dependencies inmix.exs:
```elixir
def deps do
[{:zendex, "~> 0.7.0"}]
end
```-
Ensure
zendexis started before your application:
```elixir
def application do
[applications: [:zendex]]
end
```Usage
-
Setup a
Zendex.Connectionmap, that will store your Zendesk details. It requires the URL of your Zendesk instance, your username and your password.
iex> conn = Zendex.Connection.set_up("http://test.zendesk.com", "User1", "pass")
%{authentication: "VXNlcjE6cGFzcw==", base_url: "http://test.zendesk.com"}- Make use of the other modules to do various actions on your Zendesk. Example of showing a user:
iex> Zendex.User.show(conn, 1)
%{"user": %{"id": 87, "name": "Quim Stroud", ...}}Completeness and Contributions
This package far from complete in terms of utilising all of the Zendesk API, any contributions will be welcome. Please keep the code consistent with what I have already written here.