Current section

Files

Jump to
ex_golos lib ex_golos http_api_client.ex
Raw

lib/ex_golos/http_api_client.ex

defmodule Golos.HttpClient do
alias JSONRPC2.Clients.HTTP
@url Application.get_env(:ex_golos, :api_url)
def call([api, method, args]) do
response = HTTP.call(@url, "#{api}.#{method}", args)
{:ok, response}
end
end