RevenueCat.Client behaviour (revenuecat v0.4.0)

Copy Markdown

HTTP client adapter interface for RevenueCat requests.

Summary

Functions

Dispatch a fully-formed request to the configured adapter.

Build and dispatch a request with RevenueCat headers and base options.

Types

request_opts()

@type request_opts() :: keyword()

response()

@type response() :: {:ok, binary()} | {:error, term()}

Callbacks

do_request(request_opts)

@callback do_request(request_opts()) :: response()

Functions

do_request(opts)

@spec do_request(request_opts()) :: response()

Dispatch a fully-formed request to the configured adapter.

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

@spec do_request(atom(), String.t(), request_opts()) :: response()

Build and dispatch a request with RevenueCat headers and base options.