ABS Data API Rust Client
This Rust library provides a convenient way to interact with the Australian Bureau of Statistics (ABS) Data API https://api.gov.au/assets/APIs/abs/DataAPI.openapi.html. Utilizing builder types, this library allows fluent, type-safe requests to the API.
Disclaimer
- Unofficial: This library has not been endorsed, sponsored, or officially recognized by the Australian Government in any capacity.
- Alpha This library is currently alpha stage and incomplete. Additionally, the API its built on is in beta.
Features
- Builder Pattern for Requests: Constructing requests is streamlined using builder types, allowing for a fluent and intuitive API.
- Strongly Typed Models: Benefit from Rust's type system with strongly typed models for the ABS data, minimizing runtime errors.
- Ease of Use: This library simplifies interacting in the SDMX format, making it as convenient as common HTTP JSON APIs.
Examples
Add this to your Cargo.toml:
[]
= "0.1"
Getting all cpi datasets:
use *;
let dataflow_identifier = new.build?;
let response = new
.build
.send
.await?;
Ok
Getting all metadata dataflows and then a dataset:
use *;
let meta_response = new
.build
.send
.await?;
let dataflow = &meta_response.data; // Select desired dataflow
let dataflow_identifier = new
.agency_id
.version
.build?;
let data_response = new
.detail
.start_period
.end_period
.build
.send
.await?;
Ok