diff options
author | metamuffin <metamuffin@disroot.org> | 2025-01-29 16:07:58 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-01-29 16:07:58 +0100 |
commit | e7ba3274e27fad755f15465581f5b403c82ab4d2 (patch) | |
tree | f2d693c61786ee6ed027636393fd75f086bd77e8 /client/src/lib.rs | |
parent | 5ac3f397b4a28b7bf8b399e73ad0d29e3da45ab0 (diff) | |
download | jellything-e7ba3274e27fad755f15465581f5b403c82ab4d2.tar jellything-e7ba3274e27fad755f15465581f5b403c82ab4d2.tar.bz2 jellything-e7ba3274e27fad755f15465581f5b403c82ab4d2.tar.zst |
prepare database refactor
Diffstat (limited to 'client/src/lib.rs')
-rw-r--r-- | client/src/lib.rs | 32 |
1 files changed, 1 insertions, 31 deletions
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, |