Changelog
View SourceAll notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
1.0.0 - 2026-07-05
Added
- Initial release of the official Erlang client library for the Ipregistry API.
ipregistry:lookup/2,3for single IP address lookups,ipregistry:origin_lookup/1,2for origin (requester) lookups returning parsed User-Agent data, andipregistry:batch_lookup/2,3for resolving many IP addresses at once. Batch lookups transparently split lists larger than the API's 1024-address limit into concurrently dispatched sub-requests (configurable via themax_batch_sizeandbatch_concurrencyclient options) and reassemble results in input order.ipregistry:parse_user_agents/2for parsing raw User-Agent strings into structured data.- IP addresses are accepted as binaries, strings, or
inet:ip_address()tuples. - Responses are maps with binary keys mirroring the API's JSON;
ipregistry:get/2,3walks nested fields with atom, binary, or string path elements. - Clients are plain immutable maps created with
ipregistry:new/1,2, safe to share between processes. Options:base_url,timeout,max_retries,retry_interval,retry_on_server_error,retry_on_too_many_requests,max_batch_size,batch_concurrency,cache, anduser_agent.ipregistry:eu_base_url/0returns the EU base URL for EU-only data processing. - Optional in-memory caching via the
ipregistry_cachegen_server (ETS-backed, TTL plus bounded size with oldest-first eviction), embeddable in a supervision tree withipregistry_cache:child_spec/1. Caching is disabled by default; origin lookups are never cached and batch lookups reuse cached entries. Cache reads bypass the server process and writes degrade gracefully when the cache is down. - Automatic retries with exponential backoff for transient transport errors and 5xx responses, honoring the
Retry-Afterheader. Retries on 429 Too Many Requests are disabled by default. - Errors as tagged tuples:
{api_error, #{code, message, resolution, status}}for API-reported failures and{client_error, Reason}for client-side ones. - HTTPS with explicit TLS peer verification (
verify_peer, OS trust store, hostname checking). - Offline unit tests (EUnit) and behavior tests (Common Test) against a local mock API server, plus opt-in live
system tests that run when
IPREGISTRY_API_KEYis set. - Zero external dependencies (Erlang/OTP standard library only); requires OTP 27+.