gie-client
A lightweight Rust client for GIE transparency APIs: AGSI and ALSI.
Features
- sync and async clients
- works with or without
GIE_API_KEY - proxy support
- typed query builder (
GieQuery) - pagination and time-series helpers
- optional
polarsintegration - optional
chronodate backend
Installation
[]
= "0.1"
Quick Start (Sync)
use GieQuery;
use AgsiClient;
let client = var
.ok
.filter
.map
.unwrap_or_else;
let query = new
.country
.try_date?
.try_size?;
let page = client.fetch_page?;
println!;
Quick Start (Async)
use GieQuery;
use AlsiAsyncClient;
let http = new;
let client = var
.ok
.filter
.map
.unwrap_or_else;
let query = new
.country
.try_range?
.try_size?;
let series = client.fetch_time_series.await?;
println!;
Common Options
Proxy:
let client = with_proxy_without_api_key?;
Debug requests:
let client = without_api_key.with_debug_requests;
Rate limit (default is enabled: 60 req/min, 60s cooldown on 429):
let client = without_api_key
.with_rate_limit;
let client_no_limit = without_api_key.without_rate_limit;
Custom User-Agent:
let client = without_api_key.with_user_agent;
Examples
Environment variables used by examples:
GIE_API_KEYGIE_PROXY_URLGIE_USER_AGENT