Demografix.Client (Demografix v0.1.0)

Copy Markdown View Source

Internal HTTP client for the Demografix APIs.

Holds the Demografix.new/2 struct and performs the single and batch requests. The public API in Demografix delegates here. Treat this module as internal; call through Demografix instead.

Test seam

Per-request options are merged from Application.get_env(:demografix, :req_options, []), so tests set plug: {Req.Test, Demografix} without changing the hardcoded base URLs. See the README testing section.

Summary

Types

t()

@type t() :: %Demografix.Client{api_key: String.t(), timeout: pos_integer()}