From 2670ed5b20e241da986203b085d70b5a6e5d7212 Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Tue, 27 May 2025 10:49:43 -0400 Subject: [PATCH] chore: rust fmt --- src/lib.rs | 753 +++++++++-------------------------------------------- 1 file changed, 126 insertions(+), 627 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 043a66d..e021be2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,8 +20,7 @@ fn opsert<'a, T: serde::ser::Serialize>( ) { if value.is_some() { map.insert(name, json!(value)); - - } ; + }; } fn hashmap_to_json( @@ -94,11 +93,7 @@ impl CKAN { opsert("limit", limit, &mut map); opsert("offset", offset, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.current_package_list_with_resources @@ -115,11 +110,7 @@ impl CKAN { opsert("offset", offset, &mut map); opsert("page", page, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.member_list @@ -136,11 +127,7 @@ impl CKAN { opsert("object_type", object_type, &mut map); opsert("capacity", capacity, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.package_collaborator_list @@ -155,11 +142,7 @@ impl CKAN { map.insert("id", json!(id)); opsert("capacity", capacity, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.package_collaborator_list_for_user @@ -174,11 +157,7 @@ impl CKAN { map.insert("id", json!(id)); opsert("capacity", capacity, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_list @@ -213,11 +192,7 @@ impl CKAN { opsert("include_groups", include_groups, &mut map); opsert("include_users", include_users, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.organization_list @@ -252,11 +227,7 @@ impl CKAN { opsert("include_groups", include_groups, &mut map); opsert("include_users", include_users, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_list_authz @@ -271,11 +242,7 @@ impl CKAN { opsert("available_only", available_only, &mut map); opsert("am_member", am_member, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.organization_list_for_user @@ -292,11 +259,7 @@ impl CKAN { opsert("permission", permission, &mut map); opsert("include_dataset_count", include_dataset_count, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.license_list @@ -320,11 +283,7 @@ impl CKAN { opsert("vocabulary_id", vocabulary_id, &mut map); opsert("all_fields", all_fields, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.user_list @@ -345,11 +304,7 @@ impl CKAN { opsert("all_fields", all_fields, &mut map); opsert("include_site_user", include_site_user, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.package_relationships_list @@ -366,11 +321,7 @@ impl CKAN { map.insert("id2", json!(id2)); opsert("rel", rel, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.resource_show @@ -383,11 +334,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.resource_view_show @@ -400,11 +347,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.resource_view_list @@ -417,11 +360,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_show @@ -448,11 +387,7 @@ impl CKAN { opsert("include_tags", include_tags, &mut map); opsert("include_followers", include_followers, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.organization_show @@ -479,11 +414,7 @@ impl CKAN { opsert("include_tags", include_tags, &mut map); opsert("include_followers", include_followers, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_package_show @@ -498,11 +429,7 @@ impl CKAN { map.insert("id", json!(id)); opsert("limit", limit, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.tag_show @@ -519,11 +446,7 @@ impl CKAN { opsert("vocabulary_id", vocabulary_id, &mut map); opsert("include_datasets", include_datasets, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.user_show @@ -544,11 +467,7 @@ impl CKAN { opsert("include_password_hash", include_password_hash, &mut map); opsert("include_plugin_extras", include_plugin_extras, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.package_autocomplete @@ -563,11 +482,7 @@ impl CKAN { map.insert("q", json!(q)); opsert("limit", limit, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.format_autocomplete @@ -582,11 +497,7 @@ impl CKAN { map.insert("q", json!(q)); opsert("limit", limit, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.user_autocomplete @@ -601,11 +512,7 @@ impl CKAN { map.insert("q", json!(q)); opsert("limit", limit, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_autocomplete @@ -620,11 +527,7 @@ impl CKAN { map.insert("q", json!(q)); opsert("limit", limit, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.organization_autocomplete @@ -639,11 +542,7 @@ impl CKAN { map.insert("q", json!(q)); opsert("limit", limit, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.package_search @@ -680,11 +579,7 @@ impl CKAN { opsert("include_private", include_private, &mut map); opsert("use_default_schema", use_default_schema, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.resource_search @@ -703,11 +598,7 @@ impl CKAN { opsert("offset", offset, &mut map); opsert("limit", limit, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.tag_search @@ -726,11 +617,7 @@ impl CKAN { opsert("limit", limit, &mut map); opsert("offset", offset, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.tag_autocomplete @@ -749,11 +636,7 @@ impl CKAN { opsert("limit", limit, &mut map); opsert("offset", offset, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.task_status_show @@ -772,11 +655,7 @@ impl CKAN { opsert("task_type", task_type, &mut map); opsert("key", key, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.term_translation_show @@ -791,11 +670,7 @@ impl CKAN { opsert("terms", terms, &mut map); opsert("lang_codes", lang_codes, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.get_site_user @@ -808,11 +683,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); opsert("defer_commit", defer_commit, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.status_show @@ -837,11 +708,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.user_follower_count @@ -854,11 +721,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.dataset_follower_count @@ -871,11 +734,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_follower_count @@ -888,11 +747,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.organization_follower_count @@ -905,11 +760,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.user_follower_list @@ -922,11 +773,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.dataset_follower_list @@ -939,11 +786,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_follower_list @@ -956,11 +799,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.am_following_user @@ -973,11 +812,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.am_following_dataset @@ -990,11 +825,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.am_following_group @@ -1007,11 +838,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.followee_count @@ -1024,11 +851,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.user_followee_count @@ -1041,11 +864,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.dataset_followee_count @@ -1058,11 +877,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_followee_count @@ -1075,11 +890,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.organization_followee_count @@ -1092,11 +903,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.followee_list @@ -1111,11 +918,7 @@ impl CKAN { map.insert("id", json!(id)); opsert("q", q, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.user_followee_list @@ -1128,11 +931,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.dataset_followee_list @@ -1145,11 +944,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.group_followee_list @@ -1162,11 +957,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.organization_followee_list @@ -1179,11 +970,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.member_roles_list @@ -1196,11 +983,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); opsert("group_type", group_type, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.help_show @@ -1213,11 +996,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("name", json!(name)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.config_option_show @@ -1230,11 +1009,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("key", json!(key)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.config_option_list @@ -1255,11 +1030,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); opsert("queues", queues, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.job_show @@ -1272,11 +1043,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.get.api_token_list @@ -1289,11 +1056,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("user_id", json!(user_id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.package_create @@ -1367,11 +1130,7 @@ impl CKAN { .map(|item| (item.0.as_str(), item.1.to_owned())), ); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.resource_create @@ -1438,11 +1197,7 @@ impl CKAN { map.insert("view_type", json!(view_type)); opsert("config", config, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.create_default_resource_views @@ -1459,11 +1214,7 @@ impl CKAN { opsert("package", package, &mut map); opsert("create_datastore_views", create_datastore_views, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.package_create_default_resource_views @@ -1478,11 +1229,7 @@ impl CKAN { map.insert("package", package); opsert("create_datastore_views", create_datastore_views, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.package_relationship_create @@ -1501,11 +1248,7 @@ impl CKAN { map.insert("type", json!(_type)); opsert("comment", comment, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.member_create @@ -1524,11 +1267,7 @@ impl CKAN { map.insert("object_type", json!(object_type)); map.insert("capacity", json!(capacity)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.package_collaborator_create @@ -1545,11 +1284,7 @@ impl CKAN { map.insert("user_id", json!(user_id)); map.insert("capacity", json!(capacity)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.group_create @@ -1584,11 +1319,7 @@ impl CKAN { opsert("groups", groups, &mut map); opsert("users", users, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.organization_create @@ -1619,11 +1350,7 @@ impl CKAN { opsert("packages", packages, &mut map); opsert("users", users, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.user_create @@ -1652,11 +1379,7 @@ impl CKAN { opsert("plugin_extras", plugin_extras, &mut map); opsert("with_apitoken", with_apitoken, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.user_invite @@ -1673,11 +1396,7 @@ impl CKAN { map.insert("group_id", json!(group_id)); map.insert("role", json!(role)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.vocabulary_create @@ -1692,11 +1411,7 @@ impl CKAN { map.insert("name", json!(name)); map.insert("tags", json!(tags)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.tag_create @@ -1711,11 +1426,7 @@ impl CKAN { map.insert("name", json!(name)); map.insert("vocabulary_id", json!(vocabulary_id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.follow_user @@ -1728,11 +1439,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.follow_dataset @@ -1745,11 +1452,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.group_member_create @@ -1766,11 +1469,7 @@ impl CKAN { map.insert("username", json!(username)); map.insert("role", json!(role)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.organization_member_create @@ -1787,11 +1486,7 @@ impl CKAN { map.insert("username", json!(username)); map.insert("role", json!(role)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.follow_group @@ -1804,11 +1499,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.create.api_token_create @@ -1823,11 +1514,7 @@ impl CKAN { map.insert("user", json!(user)); map.insert("name", json!(name)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.resource_update @@ -1898,11 +1585,7 @@ impl CKAN { map.insert("view_type", json!(view_type)); opsert("config", config, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.resource_view_reorder @@ -1917,11 +1600,7 @@ impl CKAN { map.insert("id", json!(id)); map.insert("order", json!(order)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.package_update @@ -1997,11 +1676,7 @@ impl CKAN { .map(|item| (item.0.as_str(), item.1.to_owned())), ); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.package_revise @@ -2020,11 +1695,7 @@ impl CKAN { map.insert("update", update); opsert("include", include, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.package_resource_reorder @@ -2039,11 +1710,7 @@ impl CKAN { map.insert("id", json!(id)); map.insert("order", json!(order)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.package_relationship_update @@ -2062,11 +1729,7 @@ impl CKAN { map.insert("type", json!(_type)); opsert("comment", comment, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.group_update @@ -2101,11 +1764,7 @@ impl CKAN { opsert("groups", groups, &mut map); opsert("users", users, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.organization_update @@ -2134,11 +1793,7 @@ impl CKAN { opsert("extras", extras, &mut map); opsert("users", users, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.user_update @@ -2167,11 +1822,7 @@ impl CKAN { opsert("plugin_extras", plugin_extras, &mut map); opsert("with_apitoken", with_apitoken, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.task_status_update @@ -2200,11 +1851,7 @@ impl CKAN { opsert("last_updated", last_updated, &mut map); opsert("error", error, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.task_status_update_many @@ -2217,11 +1864,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("data", json!(data)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.term_translation_update @@ -2238,11 +1881,7 @@ impl CKAN { map.insert("term_translation", json!(term_translation)); map.insert("lang_code", json!(lang_code)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.term_translation_update_many @@ -2255,11 +1894,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("data", json!(data)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.vocabulary_update @@ -2276,11 +1911,7 @@ impl CKAN { map.insert("name", json!(name)); map.insert("tags", json!(tags)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.package_owner_org_update @@ -2295,11 +1926,7 @@ impl CKAN { map.insert("id", json!(id)); map.insert("organization_id", json!(organization_id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.bulk_update_private @@ -2314,11 +1941,7 @@ impl CKAN { map.insert("datasets", json!(datasets)); map.insert("org_id", json!(org_id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.bulk_update_public @@ -2333,11 +1956,7 @@ impl CKAN { map.insert("datasets", json!(datasets)); map.insert("org_id", json!(org_id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.update.bulk_update_delete @@ -2352,11 +1971,7 @@ impl CKAN { map.insert("datasets", json!(datasets)); map.insert("org_id", json!(org_id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } // TODO: Verify proper parameters @@ -2385,11 +2000,7 @@ impl CKAN { .map(|item| (item.0.as_str(), item.1.to_owned())), ); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.patch.package_patch @@ -2465,11 +2076,7 @@ impl CKAN { .map(|item| (item.0.as_str(), item.1.to_owned())), ); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.patch.resource_patch @@ -2552,11 +2159,7 @@ impl CKAN { opsert("groups", groups, &mut map); opsert("users", users, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.patch.organization_patch @@ -2585,11 +2188,7 @@ impl CKAN { opsert("extras", extras, &mut map); opsert("users", users, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.patch.user_patch @@ -2618,11 +2217,7 @@ impl CKAN { opsert("plugin_extras", plugin_extras, &mut map); opsert("with_apitoken", with_apitoken, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.user_delete @@ -2635,11 +2230,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.package_delete @@ -2652,11 +2243,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.dataset_purge @@ -2669,11 +2256,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.resource_delete @@ -2686,11 +2269,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.resource_view_delete @@ -2703,11 +2282,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.resource_view_clear @@ -2720,11 +2295,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); opsert("view_types", view_types, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.package_relationship_delete @@ -2741,11 +2312,7 @@ impl CKAN { map.insert("object", json!(object)); map.insert("type", json!(_type)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.member_delete @@ -2762,11 +2329,7 @@ impl CKAN { map.insert("object", json!(object)); map.insert("object_type", json!(object_type)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.package_collaborator_delete @@ -2781,11 +2344,7 @@ impl CKAN { map.insert("id", json!(id)); map.insert("user_id", json!(user_id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.group_delete @@ -2798,11 +2357,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.organization_delete @@ -2815,11 +2370,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.group_purge @@ -2832,11 +2383,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.organization_purge @@ -2849,11 +2396,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.task_status_delete @@ -2866,11 +2409,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.vocabulary_delete @@ -2883,11 +2422,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.tag_delete @@ -2902,11 +2437,7 @@ impl CKAN { map.insert("id", json!(id)); map.insert("vocabulary_id", json!(vocabulary_id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.unfollow_user @@ -2919,11 +2450,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.unfollow_dataset @@ -2936,11 +2463,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.group_member_delete @@ -2955,11 +2478,7 @@ impl CKAN { map.insert("id", json!(id)); map.insert("username", json!(username)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.organization_member_delete @@ -2974,11 +2493,7 @@ impl CKAN { map.insert("id", json!(id)); map.insert("username", json!(username)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.unfollow_group @@ -2991,11 +2506,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.job_clear @@ -3008,11 +2519,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); opsert("queues", queues, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.job_cancel @@ -3025,11 +2532,7 @@ impl CKAN { let mut map: HashMap<&str, serde_json::Value> = HashMap::new(); map.insert("id", json!(id)); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } /// https://docs.ckan.org/en/2.11/api/index.html#ckan.logic.action.delete.api_token_revoke @@ -3044,10 +2547,6 @@ impl CKAN { map.insert("token", json!(token)); opsert("jti", jti, &mut map); let body = hashmap_to_json(&map)?; - Self::post(self) - .endpoint(endpoint) - .body(body) - .call() - .await + Self::post(self).endpoint(endpoint).body(body).call().await } }