aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteven Blowers <sblowers@findmypast.com>2016-09-09 09:27:44 +0100
committerSteven Blowers <sblowers@findmypast.com>2016-09-09 09:27:44 +0100
commit737ca346ba7a3ba7cdb15268a59b238b147fb2ea (patch)
tree8b2dff221bfa7094904daccf4da59475f3000868 /lib
parent56163392960b7297d7a272e7c2d7d147c39545e0 (diff)
downloadzendex-737ca346ba7a3ba7cdb15268a59b238b147fb2ea.tar.gz
zendex-737ca346ba7a3ba7cdb15268a59b238b147fb2ea.tar.xz
Fixing credo strict errors.
Diffstat (limited to 'lib')
-rw-r--r--lib/zendex/connection.ex4
-rw-r--r--lib/zendex/http_client/in_memory.ex4
-rw-r--r--lib/zendex/search.ex7
-rw-r--r--lib/zendex/ticket.ex4
4 files changed, 17 insertions, 2 deletions
diff --git a/lib/zendex/connection.ex b/lib/zendex/connection.ex
index 7c532eb..d32f148 100644
--- a/lib/zendex/connection.ex
+++ b/lib/zendex/connection.ex
@@ -1,4 +1,8 @@
defmodule Zendex.Connection do
+ @moduledoc """
+ Establishes connection details with Zendex by the user providing a base url,
+ username and password.
+ """
@type t :: %{base_url: String.t, authentication: binary}
diff --git a/lib/zendex/http_client/in_memory.ex b/lib/zendex/http_client/in_memory.ex
index 8efdba1..31dc00a 100644
--- a/lib/zendex/http_client/in_memory.ex
+++ b/lib/zendex/http_client/in_memory.ex
@@ -1,4 +1,8 @@
defmodule Zendex.HttpClient.InMemory do
+ @moduledoc """
+ Allows testing of the Zendex project by mocking out calls to an actual Zendesk
+ API.
+ """
def get!("http://test.zendesk.com/api/v2/tickets.json", [{"Authorization", authentication}]) do
"ticket"
diff --git a/lib/zendex/search.ex b/lib/zendex/search.ex
index f333df9..09b6c13 100644
--- a/lib/zendex/search.ex
+++ b/lib/zendex/search.ex
@@ -1,10 +1,13 @@
defmodule Zendex.Search do
+ @moduledoc """
+ Allows use of the Zendex search API functionality.
+ """
@url "/api/v2/search.json?query="
-
@http_client Application.get_env(:zendex, :http_client)
- @spec query(Zendex.Connection.t, map, String.t, String.t) :: HTTPoison.Response.t
+ @spec query(Zendex.Connection.t, map, String.t, String.t)
+ :: HTTPoison.Response.t
def query(connection, query, sort_by \\ "", sort_order \\ "asc") do
search_string = create_search_string(query)
sort_string = create_sort_string(sort_by, sort_order)
diff --git a/lib/zendex/ticket.ex b/lib/zendex/ticket.ex
index 87395be..952fbf4 100644
--- a/lib/zendex/ticket.ex
+++ b/lib/zendex/ticket.ex
@@ -1,4 +1,8 @@
defmodule Zendex.Ticket do
+ @moduledoc """
+ Allows interaction with the Zendesk Ticket API, to so things such as creating
+ and listing tickets.
+ """
@url "/api/v2/tickets.json"