ExShopifyApp (ex_shopify_app v1.2.0)

Documentation for ExShopifyApp.

Summary

Functions

Returns the App Events config, with defaults merged in.

Returns the Tesla adapter used for all outbound HTTP requests.

Functions

api_key()

@spec api_key() :: String.t()

api_secret()

@spec api_secret() :: String.t()

api_version()

@spec api_version() :: String.t()

app_events_config()

@spec app_events_config() :: keyword()

Returns the App Events config, with defaults merged in.

Read individual settings off the result:

Configure via:

config :ex_shopify_app, :app_events,
  token_cache: MyApp.TokenCache

tesla_adapter()

@spec tesla_adapter() :: Tesla.Client.adapter()

Returns the Tesla adapter used for all outbound HTTP requests.

Resolution order:

  1. :ex_shopify_app, :tesla_adapter — the library's own config, so host apps can set the adapter for this library without touching global Tesla config.
  2. :tesla, :adapter — Tesla's global config, honoured as a fallback.
  3. Tesla.Adapter.Mint — the default.

The test env routes everything through a Mox-backed mock adapter via the global Tesla config (see test/support/mocks.ex).