From eeb46dc84d34c5ea5f43ed8b7b0b60854e204d59 Mon Sep 17 00:00:00 2001 From: phoenix Date: Thu, 4 Jun 2026 21:05:11 -0400 Subject: [PATCH 1/4] Added function to convert response to a json value --- src/twilio/api/mod.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/twilio/api/mod.rs b/src/twilio/api/mod.rs index 86d589d..fe0e99b 100644 --- a/src/twilio/api/mod.rs +++ b/src/twilio/api/mod.rs @@ -1,5 +1,27 @@ pub mod types; +pub async fn popp(response: reqwest::Response) -> serde_json::Value { + match response.json().await { + Ok(json_body) => { + json_body + /* + let res = jsonBody.as_str(); + match serde_json::from_str(res) { + Ok(converted) => { + converted + } + Err(_err) => { + serde_json::Value::Null + } + } + */ + } + Err(_err) => { + serde_json::Value::Null + } + } +} + pub async fn send_mssage( msg: &textsender_models::message::Message, contact: &textsender_models::contact::Contact, -- 2.47.3 From c9d167da8df3f5f201896fb81795f8a21335fe91 Mon Sep 17 00:00:00 2001 From: phoenix Date: Thu, 4 Jun 2026 21:06:08 -0400 Subject: [PATCH 2/4] Changed name of function --- src/twilio/api/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/twilio/api/mod.rs b/src/twilio/api/mod.rs index fe0e99b..df16f74 100644 --- a/src/twilio/api/mod.rs +++ b/src/twilio/api/mod.rs @@ -1,6 +1,6 @@ pub mod types; -pub async fn popp(response: reqwest::Response) -> serde_json::Value { +pub async fn response_to_json(response: reqwest::Response) -> serde_json::Value { match response.json().await { Ok(json_body) => { json_body -- 2.47.3 From b85b329ea58abc5709b90c8e8ed46aa9dc2f98c4 Mon Sep 17 00:00:00 2001 From: phoenix Date: Thu, 4 Jun 2026 21:07:03 -0400 Subject: [PATCH 3/4] Cleanup --- src/twilio/api/mod.rs | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/twilio/api/mod.rs b/src/twilio/api/mod.rs index df16f74..1fae6d4 100644 --- a/src/twilio/api/mod.rs +++ b/src/twilio/api/mod.rs @@ -2,23 +2,8 @@ pub mod types; pub async fn response_to_json(response: reqwest::Response) -> serde_json::Value { match response.json().await { - Ok(json_body) => { - json_body - /* - let res = jsonBody.as_str(); - match serde_json::from_str(res) { - Ok(converted) => { - converted - } - Err(_err) => { - serde_json::Value::Null - } - } - */ - } - Err(_err) => { - serde_json::Value::Null - } + Ok(json_body) => json_body, + Err(_err) => serde_json::Value::Null, } } -- 2.47.3 From fb07761c25cc5a037d696bba8548bf4854817340 Mon Sep 17 00:00:00 2001 From: phoenix Date: Thu, 4 Jun 2026 21:07:27 -0400 Subject: [PATCH 4/4] bump: swoosh --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 804e9cd..6e9529e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1573,7 +1573,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "swoosh" -version = "0.3.0" +version = "0.3.1" dependencies = [ "base64-ng", "const_format", diff --git a/Cargo.toml b/Cargo.toml index 0917518..74b6601 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "swoosh" -version = "0.3.0" +version = "0.3.1" edition = "2024" rust-version = "1.95" description = "Library to send text messages" -- 2.47.3