diff options
author | Steven Blowers <shdblowers@gmail.com> | 2016-10-30 19:07:36 +0000 |
---|---|---|
committer | Steven Blowers <shdblowers@gmail.com> | 2016-10-30 19:07:36 +0000 |
commit | aefb114037c6670b580c07f0c2ba1cdab4285bcb (patch) | |
tree | a58da4a700be6f68ded8ebb13b1c8b02fdae272e /lib | |
parent | 01d88a22c6cc00b561b0114c0865ba52f355d97c (diff) | |
download | zendex-aefb114037c6670b580c07f0c2ba1cdab4285bcb.tar.gz zendex-aefb114037c6670b580c07f0c2ba1cdab4285bcb.tar.xz |
adding doctests to connection
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zendex/connection.ex | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/zendex/connection.ex b/lib/zendex/connection.ex index 248c253..5399f29 100644 --- a/lib/zendex/connection.ex +++ b/lib/zendex/connection.ex @@ -7,6 +7,15 @@ defmodule Zendex.Connection do @typedoc "The connection paramters" @type t :: %{base_url: String.t, authentication: binary} + @doc """ + Setup connection details with your Zendesk. + + ## Examples + + iex> Zendex.Connection.setup("http://example.zendesk.com", "ZendeskUser", "Password1") + %{authentication: "WmVuZGVza1VzZXI6UGFzc3dvcmQx", base_url: "http://example.zendesk.com"} + + """ @spec setup(String.t, String.t, String.t) :: t def setup(base_url, username, password) do authentication = Base.encode64("#{username}:#{password}") |