Compare commits

..

5 commits

Author SHA1 Message Date
rzmk
143b1b9863 chore: add Cargo.lock for example 2026-02-03 18:28:52 -05:00
rzmk
3bf83b55e9 chore: update example for 0.1.3 2026-02-03 18:28:04 -05:00
rzmk
6785fb4c2a build: update Cargo.lock with 0.1.3 2026-02-03 18:27:18 -05:00
rzmk
f58eef826e build: update dependencies 2026-02-03 18:21:12 -05:00
rzmk
723130792c feat: add example of using status_show method 2026-02-03 18:13:21 -05:00
7 changed files with 2135 additions and 417 deletions

765
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
[package]
name = "ckanaction"
version = "0.1.2"
version = "0.1.3"
edition = "2024"
description = "Rust library crate featuring an API wrapper of the CKAN Action v3 API."
repository = "https://github.com/dathere/ckanaction"
@ -11,10 +11,10 @@ categories = ["api-bindings", "asynchronous"]
exclude = ["/docs"]
[dependencies]
bon = "3.6.3"
reqwest = { version = "0.12.15", features = ["json", "multipart", "stream"] }
serde = "1.0.219"
serde_json = "1.0.140"
bon = "3.8.2"
reqwest = { version = "0.12.28", features = ["json", "multipart", "stream"] }
serde = "1.0.228"
serde_json = "1.0.149"
[dev-dependencies]
tokio = { version = "1.45.1", features = ["full"] }
tokio = { version = "1.49.0", features = ["full"] }

2
examples/status-show/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.env
target/

1742
examples/status-show/Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,8 @@
[package]
name = "status-show"
version = "0.1.0"
edition = "2024"
[dependencies]
ckanaction = "0.1.3"
tokio = { version = "1.49.0", features = ["full"] }

View file

@ -0,0 +1,9 @@
# Example of using ckanaction to run the /status_show API endpoint
## Usage
Run the following command to run the `/status_show` CKAN Action API endpoint on `http://localhost:5000` and print the formatted debug output.
```bash
cargo run
```

View file

@ -0,0 +1,14 @@
#[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")
.build();
// Send request to /status_show and print formatted debug output
let status_show = ckan.status_show().await?;
println!("{status_show:#?}");
Ok(())
}