diff options
Diffstat (limited to 'client/src/lib.rs')
-rw-r--r-- | client/src/lib.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/client/src/lib.rs b/client/src/lib.rs index 2af230f..c770a83 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -131,6 +131,15 @@ impl Session { .await } + pub async fn asset(&self, writer: impl UnpinWrite, token: &str, width: usize) -> Result<()> { + debug!("downloading asset {token:?} (w={width})"); + self.download_url( + writer, + format!("{}/asset/{token}?width={width}", self.instance.base(),), + ) + .await + } + pub async fn stream( &self, writer: impl UnpinWrite, |