Expand description
§Socrata SDK
A high-performance, asynchronous Rust client for the Socrata Open Data API (SODA).
§Features
- Async/Await: Built on
reqwestandtokio. - Generic: Works with any
serde::Deserializetype. - Pagination: Automatic iteration over large datasets with
get_all().
§Example
ⓘ
use socrata_sdk::SocrataClient;
use serde::Deserialize;
#[derive(Deserialize)]
struct Contract { id: String }
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let client = SocrataClient::new("https://www.datos.gov.co", None);
let contracts: Vec<Contract> = client.fetch("abcd-1234", 100, 0, None, None).await?;
println!("Fetched {} contracts", contracts.len());
Ok(())
}Structs§
- Catalog
Entry - Wrapper for catalog API response.
- Catalog
Resource - Information about a dataset from the catalog API.
- Catalog
Response - Response from the catalog API.
- Column
Metadata - Metadata about a Socrata dataset column.
- Dataset
Metadata - Metadata about a Socrata dataset.
- Socrata
Client - A client for the Socrata Open Data API (SODA).
Enums§
Constants§
- DEFAULT_
LIMIT - Default page size for pagination (matches Socrata’s default).