aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-29 16:07:58 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-29 16:07:58 +0100
commite7ba3274e27fad755f15465581f5b403c82ab4d2 (patch)
treef2d693c61786ee6ed027636393fd75f086bd77e8 /client
parent5ac3f397b4a28b7bf8b399e73ad0d29e3da45ab0 (diff)
downloadjellything-e7ba3274e27fad755f15465581f5b403c82ab4d2.tar
jellything-e7ba3274e27fad755f15465581f5b403c82ab4d2.tar.bz2
jellything-e7ba3274e27fad755f15465581f5b403c82ab4d2.tar.zst
prepare database refactor
Diffstat (limited to 'client')
-rw-r--r--client/Cargo.toml6
-rw-r--r--client/src/lib.rs32
2 files changed, 4 insertions, 34 deletions
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<NodePublic> {
+ pub async fn node(&self, id: &str) -> Result<Node> {
debug!("downloading node {id:?}");
Ok(self
.client
@@ -82,36 +82,6 @@ impl Session {
.json()
.await?)
}
- pub async fn node_extended(&self, id: &str) -> Result<ExtendedNode> {
- 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,