HTTP client for making requests to the Tink API with built-in caching.
This module handles authentication, request building, and response parsing for all Tink API endpoints. It automatically caches GET requests for improved performance.
Cache Key Design
Cache keys are built from the full URL including query parameters, so different paginated or filtered requests produce independent cache entries:
"user_abc:data:v2:accounts?pageSize=10&pageToken=ABC" → own entry
"user_abc:data:v2:accounts?pageSize=10&pageToken=XYZ" → own entry
Summary
Functions
Performs a DELETE request and invalidates user cache on success.
Performs a GET request with automatic caching.
Performs a PATCH request and invalidates user cache on success.
Performs a POST request and invalidates user cache on success.
Performs a PUT request and invalidates user cache on success.
Types
Functions
@spec delete(t(), String.t(), keyword()) :: {:ok, map()} | {:error, Tink.Error.t()}
Performs a DELETE request and invalidates user cache on success.
@spec get(t(), String.t(), keyword()) :: {:ok, map()} | {:error, Tink.Error.t()}
Performs a GET request with automatic caching.
GET requests are cached based on the resource type with appropriate TTLs.
Cache can be disabled per-request via opts: [cache: false].
Performs a PATCH request and invalidates user cache on success.
Performs a POST request and invalidates user cache on success.
Performs a PUT request and invalidates user cache on success.