feat: add package_show

This commit is contained in:
rzmk 2026-05-02 02:48:08 +00:00
parent 1de1b7e2a0
commit f0a8dc13bc
3 changed files with 13 additions and 2 deletions

2
Cargo.lock generated
View file

@ -75,7 +75,7 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "ckanaction"
version = "0.1.3"
version = "0.1.4"
dependencies = [
"bon",
"reqwest",

View file

@ -1,6 +1,6 @@
[package]
name = "ckanaction"
version = "0.1.3"
version = "0.1.4"
edition = "2024"
description = "Rust library crate featuring an API wrapper of the CKAN Action v3 API."
repository = "https://github.com/dathere/ckanaction"

View file

@ -331,6 +331,17 @@ impl CKAN {
)
}
/// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.package_show
#[builder]
pub async fn package_show(
&self,
id: String,
use_default_schema: Option<bool>,
include_plugin_data: Option<bool>,
) -> Result<serde_json::Value, Box<dyn std::error::Error>> {
post!(&self, "package_show", (json id), use_default_schema, include_plugin_data)
}
/// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.resource_show
#[builder]
pub async fn resource_show(