From e7ba3274e27fad755f15465581f5b403c82ab4d2 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Wed, 29 Jan 2025 16:07:58 +0100 Subject: prepare database refactor --- client/Cargo.toml | 6 +++--- client/src/lib.rs | 32 +------------------------------- 2 files changed, 4 insertions(+), 34 deletions(-) (limited to 'client') diff --git a/client/Cargo.toml b/client/Cargo.toml index b00fbc4..7368ac3 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" jellycommon = { path = "../common" } log = { workspace = true } reqwest = { workspace = true } -anyhow = "1.0.92" -serde_json = "1.0.132" -serde = { version = "1.0.214", features = ["derive"] } +anyhow = "1.0.95" +serde_json = "1.0.138" +serde = { version = "1.0.217", features = ["derive"] } tokio = { workspace = true } diff --git a/client/src/lib.rs b/client/src/lib.rs index 50266ee..191db7a 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -71,7 +71,7 @@ impl Session { format!("session={}", self.session_token) } - pub async fn node(&self, id: &str) -> Result { + pub async fn node(&self, id: &str) -> Result { debug!("downloading node {id:?}"); Ok(self .client @@ -82,36 +82,6 @@ impl Session { .json() .await?) } - pub async fn node_extended(&self, id: &str) -> Result { - debug!("downloading extended node {id:?}"); - Ok(self - .client - .get(format!("{}/n/{id}/extended", self.instance.base())) - .send() - .await? - .error_for_status()? - .json() - .await?) - } - - pub async fn node_asset( - &self, - writer: impl UnpinWrite, - id: &str, - role: AssetRole, - width: usize, - ) -> Result<()> { - debug!("downloading asset {role:?} for {id:?}"); - self.download_url( - writer, - format!( - "{}/n/{id}/asset?role={}&width={width}", - self.instance.base(), - role.as_str() - ), - ) - .await - } pub async fn node_thumbnail( &self, -- cgit v1.2.3-70-g09d2