Aura.Requester (Aura v0.9.0)

View Source

Utility for making HTTP requests to a Hex-compliant API

Summary

Types

The HTTP method to use for a given request

Functions

Makes a HTTP DELETE request

Inspects given options, or the Application.get_env/3 for a Hex-compliant API URL

Makes a HTTP GET request

Makes a HTTP POST request

Makes a HTTP PUT request

Makes a HTTP request

Types

http_method()

@type http_method() :: :get | :post | :put | :delete

The HTTP method to use for a given request

Functions

delete(path, opts \\ [])

@spec delete(path :: Aura.Common.api_path(), opts :: list()) ::
  {:ok, Req.Response.t()} | {:error, term()}

Makes a HTTP DELETE request

find_repo_url(arg1)

@spec find_repo_url(opts :: list()) :: String.t()

Inspects given options, or the Application.get_env/3 for a Hex-compliant API URL

get(path, opts \\ [])

@spec get(path :: Aura.Common.api_path(), opts :: list()) ::
  {:ok, Req.Response.t()} | {:error, term()}

Makes a HTTP GET request

hex_pm_url()

Returns https://hex.pm/api

post(path, opts \\ [])

@spec post(path :: Aura.Common.api_path(), opts :: list()) ::
  {:ok, Req.Response.t()} | {:error, term()}

Makes a HTTP POST request

put(path, opts \\ [])

@spec put(path :: Aura.Common.api_path(), opts :: list()) ::
  {:ok, Req.Response.t()} | {:error, term()}

Makes a HTTP PUT request

request(method, path, opts \\ [])

@spec request(method :: http_method(), path :: Aura.Common.api_path(), opts :: list()) ::
  {:ok, Req.Response.t()} | {:error, term()}

Makes a HTTP request