From 0d29a691c031a8377b62e57f45361206c5e6efb2 Mon Sep 17 00:00:00 2001 From: rzmk <30333942+rzmk@users.noreply.github.com> Date: Fri, 2 May 2025 09:21:16 -0400 Subject: [PATCH] build: remove dotenvy --- Cargo.lock | 7 ------- Cargo.toml | 5 ++++- README.md | 3 +-- src/main.rs | 7 +------ 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index abf6163..1288f78 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -113,7 +113,6 @@ name = "ckanaction" version = "0.1.0" dependencies = [ "bon", - "dotenvy", "reqwest", "serde", "serde_json", @@ -182,12 +181,6 @@ dependencies = [ "syn", ] -[[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - [[package]] name = "encoding_rs" version = "0.8.35" diff --git a/Cargo.toml b/Cargo.toml index 1acce02..7aa5308 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,10 +2,13 @@ name = "ckanaction" version = "0.1.0" edition = "2024" +description = "Rust library crate featuring an API wrapper of the CKAN Action v3 API." +repository = "https://github.com/dathere/ckanaction" +keywords = ["ckan"] +categories = ["api-bindings", "asynchronous"] [dependencies] bon = "3.6.3" -dotenvy = "0.15.7" reqwest = { version = "0.12.15", features = ["json", "multipart", "stream"] } serde = "1.0.219" serde_json = "1.0.140" diff --git a/README.md b/README.md index 8638886..1f09f64 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ckanaction -Rust library crate to access CKAN Action API endpoints through Rust builders. Based on the CKAN Action API v3. Endpoints are expected to return with an output of type `serde_json::Value`. +Rust library crate to access [CKAN](https://ckan.org) Action API endpoints through Rust builders. Based on the CKAN Action API v3. Endpoints are expected to return with an output of type `serde_json::Value`. ![ckanaction IDE hints demo](https://github.com/user-attachments/assets/515d5742-4a33-43b9-9f3f-4795d18579c0) @@ -76,5 +76,4 @@ println!("{status_show:#?}"); ## Notes -- Add the `CKAN_API_TOKEN` environment variable to a `.env` file where the program runs to include the token when making requests to the CKAN API. - If you use a `maybe_fn()` then if you provide `None` it will be ignored and that parameter will not be added to the JSON body. This library assumes `None` would not be provided as a value (since the cases where it is a value is often the default value that the CKAN API already has set for that parameter). diff --git a/src/main.rs b/src/main.rs index 9df8ebe..a345eb4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,14 +1,9 @@ -use dotenvy::dotenv; - #[tokio::main] async fn main() -> Result<(), Box> { - // Load environment variables from .env file - dotenv()?; - // Initialize and build CKAN struct let ckan = ckanaction::CKAN::builder() .url("http://localhost:5000") - .token(dotenvy::var("CKAN_API_TOKEN")?) + .token("CKAN_API_TOKEN".to_string()) .build(); // Send request to /status_show and print output