aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Blowers <sblowers@findmypast.com>2016-09-16 14:35:29 (GMT)
committerSteven Blowers <sblowers@findmypast.com>2016-09-16 14:35:29 (GMT)
commitb06ef211f3cc6dcad903f408ae8cc5218e1713a0 (patch)
treee26aa75bd4c5550538322bde8e2cbd8bb9f8e7c5
parent1b6d6fc8e83c594653a3f19490c9d1e4cb80234f (diff)
downloadzendex-b06ef211f3cc6dcad903f408ae8cc5218e1713a0.tar.gz
zendex-b06ef211f3cc6dcad903f408ae8cc5218e1713a0.tar.xz
piping uri creation
-rw-r--r--lib/zendex/search.ex7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/zendex/search.ex b/lib/zendex/search.ex
index badf0bb..d38fd4c 100644
--- a/lib/zendex/search.ex
+++ b/lib/zendex/search.ex
@@ -14,9 +14,10 @@ defmodule Zendex.Search do
search_string = create_search_string(query)
sort_string = create_sort_string(sort_by, sort_order)
- full_uri = connection.base_url <> @url <> search_string <> sort_string
-
- full_uri
+ connection.base_url
+ |> Kernel.<>(@url)
+ |> Kernel.<>(search_string)
+ |> Kernel.<>(sort_string)
|> @http_client.get!(CommonHelpers.get_headers(connection.authentication))
|> CommonHelpers.decode_response
end