Current section

Files

Jump to
datamusex lib display_purposes.ex
Raw

lib/display_purposes.ex

defmodule DisplayPurposes do
@moduledoc """
Display Purposes API wrapper
"""
use HTTPoison.Base
def tags(word, headers \\ [], options \\ [])
when is_binary(word) and is_list(headers) and is_list(options) do
get(word, headers, options)
end
def process_url(url) do
"https://d212rkvo8t62el.cloudfront.net/tag/" <> url
end
def process_response_body(body) do
body |> Poison.decode!()
end
end