YelpEx v0.2.1 YelpEx.API View Source

Yelp Fusion API wrapper for Elixir.

Provides functionality to work with the Yelp Fusion API.

Link to this section Summary

Functions

Issues a DELETE request to the given url, raising an exception in case of failure

Issues a DELETE request to the given url

Issues a GET request to the given url, raising an exception in case of failure

Issues a GET request to the given url

Issues a HEAD request to the given url, raising an exception in case of failure

Issues a HEAD request to the given url

Issues a OPTIONS request to the given url, raising an exception in case of failure

Issues an OPTIONS request to the given url

Issues a PATCH request to the given url, raising an exception in case of failure

Issues a PATCH request to the given url

Issues a POST request to the given url, raising an exception in case of failure

Issues a POST request to the given url

Issues a PUT request to the given url, raising an exception in case of failure

Issues a PUT request to the given url

Starts HTTPoison and its dependencies

Requests the next message to be streamed for a given HTTPoison.AsyncResponse

Link to this section Types

Link to this type body() View Source
body() :: binary() | {:form, [{atom(), any()}]} | {:file, binary()}
Link to this type headers() View Source
headers() :: [{binary(), binary()}] | %{optional(binary()) => binary()}

Link to this section Functions

Link to this function delete!(url, headers \\ [], options \\ []) View Source

Issues a DELETE request to the given url, raising an exception in case of failure.

If the request does not fail, the response is returned.

See request!/5 for more detailed information.

Link to this function delete(url, headers \\ [], options \\ []) View Source

Issues a DELETE request to the given url.

Returns {:ok, response} if the request is successful, {:error, reason} otherwise.

See request/5 for more detailed information.

Issues a GET request to the given url, raising an exception in case of failure.

If the request does not fail, the response is returned.

See request!/5 for more detailed information.

Link to this function get(url, headers \\ [], options \\ []) View Source

Issues a GET request to the given url.

Returns {:ok, response} if the request is successful, {:error, reason} otherwise.

See request/5 for more detailed information.

Link to this function head!(url, headers \\ [], options \\ []) View Source

Issues a HEAD request to the given url, raising an exception in case of failure.

If the request does not fail, the response is returned.

See request!/5 for more detailed information.

Link to this function head(url, headers \\ [], options \\ []) View Source

Issues a HEAD request to the given url.

Returns {:ok, response} if the request is successful, {:error, reason} otherwise.

See request/5 for more detailed information.

Link to this function options!(url, headers \\ [], options \\ []) View Source

Issues a OPTIONS request to the given url, raising an exception in case of failure.

If the request does not fail, the response is returned.

See request!/5 for more detailed information.

Link to this function options(url, headers \\ [], options \\ []) View Source

Issues an OPTIONS request to the given url.

Returns {:ok, response} if the request is successful, {:error, reason} otherwise.

See request/5 for more detailed information.

Link to this function patch!(url, body, headers \\ [], options \\ []) View Source

Issues a PATCH request to the given url, raising an exception in case of failure.

If the request does not fail, the response is returned.

See request!/5 for more detailed information.

Link to this function patch(url, body, headers \\ [], options \\ []) View Source

Issues a PATCH request to the given url.

Returns {:ok, response} if the request is successful, {:error, reason} otherwise.

See request/5 for more detailed information.

Link to this function post!(url, body, headers \\ [], options \\ []) View Source

Issues a POST request to the given url, raising an exception in case of failure.

If the request does not fail, the response is returned.

See request!/5 for more detailed information.

Link to this function post(url, body, headers \\ [], options \\ []) View Source

Issues a POST request to the given url.

Returns {:ok, response} if the request is successful, {:error, reason} otherwise.

See request/5 for more detailed information.

Link to this function put!(url, body \\ "", headers \\ [], options \\ []) View Source

Issues a PUT request to the given url, raising an exception in case of failure.

If the request does not fail, the response is returned.

See request!/5 for more detailed information.

Link to this function put(url, body \\ "", headers \\ [], options \\ []) View Source

Issues a PUT request to the given url.

Returns {:ok, response} if the request is successful, {:error, reason} otherwise.

See request/5 for more detailed information.

Link to this function request!(method, url, body \\ "", headers \\ [], options \\ []) View Source
request!(atom(), binary(), body(), headers(), Keyword.t()) ::
  HTTPoison.Response.t()
request!(atom(), String.t(), body(), headers(), Keyword.t()) ::
  HTTPoison.Response.t()

Same as request/5, but returns HTTPoison.Response or raises an error.

Link to this function request(method, url, body \\ "", headers \\ [], options \\ []) View Source
request(atom(), binary(), body(), headers(), Keyword.t()) ::
  {:ok, HTTPoison.Response.t() | HTTPoison.AsyncResponse.t()}
  | {:error, HTTPoison.Error.t()}
request(atom(), String.t(), body(), headers(), Keyword.t()) ::
  {:ok, HTTPoison.Response.t()} | {:error, HTTPoison.Error.t()}

Issues an HTTP request.

Starts HTTPoison and its dependencies.

Requests the next message to be streamed for a given HTTPoison.AsyncResponse.

See request!/5 for more detailed information.