From becd27007404636f6ecffef1bfdff75ba94f2cb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20=22pxsty=22=20K=C3=96K?= <75846829+pxsty0@users.noreply.github.com> Date: Wed, 13 Nov 2024 13:25:04 +0300 Subject: [PATCH 1/2] refectored according to new api authentication usage --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a9eaa42..88645a2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,13 +19,13 @@ impl PxServ { let client = Client::new(); let request_body = json!({ - "apiKey":self.apikey, "key":key, "value":value }); let request = client .post("https://api.pxserv.net/database/setData") + .header("apikey", self.apikey.to_string()) .json(&request_body) .send(); @@ -56,12 +56,12 @@ impl PxServ { let client = Client::new(); let request_body = json!({ - "apiKey":self.apikey, "key":key, }); let request = client .post("https://api.pxserv.net/database/getData") + .header("apikey", self.apikey.to_string()) .json(&request_body) .send(); @@ -104,12 +104,12 @@ impl PxServ { let client = Client::new(); let request_body = json!({ - "apiKey":self.apikey, "key":key, }); let request = client .post("https://api.pxserv.net/database/removeData") + .header("apikey", self.apikey.to_string()) .json(&request_body) .send(); From 1d2ae3a3160e433ba820494c124904f1fe4cc662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20=22pxsty=22=20K=C3=96K?= <75846829+pxsty0@users.noreply.github.com> Date: Wed, 13 Nov 2024 13:25:40 +0300 Subject: [PATCH 2/2] updated library version --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5494f54..5e55657 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -519,7 +519,7 @@ dependencies = [ [[package]] name = "pxserv" -version = "0.0.1" +version = "1.0.0" dependencies = [ "reqwest", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index ce1702f..e78f999 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pxserv" -version = "0.0.1" +version = "1.0.0" description = "PxServ Library for Rust" edition = "2021" authors = ["mustafa 'pxsty' kok "]