diff options
Diffstat (limited to 'client/src/lib.rs')
-rw-r--r-- | client/src/lib.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/client/src/lib.rs b/client/src/lib.rs index 5da718d..e0ab440 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -71,8 +71,8 @@ impl Session { format!("session={}", self.session_token) } - pub async fn node(&self, id: &str) -> Result<Node> { - debug!("downloading node {id:?}"); + pub async fn node(&self, id: NodeIDOrSlug) -> Result<Node> { + debug!("downloading node {id}"); Ok(self .client .get(format!("{}/n/{id}", self.instance.base())) @@ -86,11 +86,11 @@ impl Session { pub async fn node_thumbnail( &self, writer: impl UnpinWrite, - id: &str, + id: NodeIDOrSlug, width: usize, time: f64, ) -> Result<()> { - debug!("downloading thumbnail for {id:?} at {time}s"); + debug!("downloading thumbnail for {id} at {time}s"); self.download_url( writer, format!( @@ -113,14 +113,14 @@ impl Session { pub async fn stream( &self, writer: impl UnpinWrite, - id: &str, + id: NodeIDOrSlug, stream_spec: &StreamSpec, ) -> Result<()> { self.download_url(writer, self.stream_url(id, stream_spec)) .await } - pub fn stream_url(&self, id: &str, stream_spec: &StreamSpec) -> String { + pub fn stream_url(&self, id: NodeIDOrSlug, stream_spec: &StreamSpec) -> String { format!( "{}/n/{}/stream?{}&{}", self.instance.base(), |