Flickrex.Operation.Rest (flickrex v0.8.1) View Source

Holds data necessary for an operation on the Flickr REST service.

The :format must be one of :json or :rest, the latter returning XML. The default is :json.

The parser must be a 1- or 2-arity function, accepting an :ok or :error response, and optionally a Flickrex.Config struct.

Link to this section Summary

Link to this section Types

Specs

config() :: Flickrex.Config.t()

Specs

Specs

format() :: :json | :rest

Specs

http_headers() :: %{optional(String.t()) => String.t()}

Specs

http_method() :: atom()

Specs

method() :: String.t()

Specs

params() :: %{optional(String.Chars.t()) => String.Chars.t()}

Specs

parser() :: (results() -> results()) | (results(), config() -> results())

Specs

path() :: String.t()

Specs

results() :: success_t() | error_t()

Specs

service() :: atom()

Specs

Specs

t() :: %Flickrex.Operation.Rest{
  default_params: params(),
  format: format(),
  http_headers: http_headers(),
  http_method: http_method(),
  method: method(),
  params: params(),
  parser: parser(),
  path: path(),
  service: service()
}