mirror of
https://github.com/dathere/ckanaction.git
synced 2025-11-09 14:19:49 +00:00
14 lines
410 B
Rust
14 lines
410 B
Rust
#[tokio::main]
|
|
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
// Initialize and build CKAN struct
|
|
let ckan = ckanaction::CKAN::builder()
|
|
.url("http://localhost:5000")
|
|
.token("CKAN_API_TOKEN".to_string())
|
|
.build();
|
|
|
|
// Send request to /status_show and print output
|
|
let status_show = ckan.status_show().await?;
|
|
println!("{status_show:#?}");
|
|
|
|
Ok(())
|
|
}
|