mirror of
https://github.com/dathere/ckanaction.git
synced 2026-02-04 10:05:33 +00:00
Compare commits
4 commits
809948b8f4
...
6a8187bc3c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a8187bc3c | ||
|
|
474c90f47d | ||
|
|
205f6e480b | ||
|
|
beb267d5b5 |
4 changed files with 327 additions and 1037 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -110,7 +110,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ckanaction"
|
name = "ckanaction"
|
||||||
version = "0.1.0"
|
version = "0.1.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bon",
|
"bon",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
[package]
|
[package]
|
||||||
name = "ckanaction"
|
name = "ckanaction"
|
||||||
version = "0.1.0"
|
version = "0.1.2"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
description = "Rust library crate featuring an API wrapper of the CKAN Action v3 API."
|
description = "Rust library crate featuring an API wrapper of the CKAN Action v3 API."
|
||||||
repository = "https://github.com/dathere/ckanaction"
|
repository = "https://github.com/dathere/ckanaction"
|
||||||
license = "Unlicense"
|
license = "Unlicense"
|
||||||
keywords = ["ckan"]
|
keywords = ["ckan"]
|
||||||
categories = ["api-bindings", "asynchronous"]
|
categories = ["api-bindings", "asynchronous"]
|
||||||
|
exclude = ["/docs"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bon = "3.6.3"
|
bon = "3.6.3"
|
||||||
|
|
|
||||||
1302
src/lib.rs
1302
src/lib.rs
File diff suppressed because it is too large
Load diff
|
|
@ -15,11 +15,18 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
|
#[ignore = "Set values for const at top of tests file locally."]
|
||||||
async fn status_show() -> Result<(), Box<dyn std::error::Error>> {
|
async fn status_show() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let ckan = get_ckan_builder().await;
|
let ckan = get_ckan_builder().await;
|
||||||
let response = ckan.status_show().await?;
|
let response = ckan.status_show().await?;
|
||||||
assert!(response.is_object());
|
assert!(response.is_object());
|
||||||
let success = response.as_object().unwrap().get("success").unwrap().as_bool().unwrap();
|
let success = response
|
||||||
|
.as_object()
|
||||||
|
.unwrap()
|
||||||
|
.get("success")
|
||||||
|
.unwrap()
|
||||||
|
.as_bool()
|
||||||
|
.unwrap();
|
||||||
assert!(success);
|
assert!(success);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue