rive_http/channels/
voice.rs

1use crate::prelude::*;
2use rive_models::voice::VoiceAuthenticationData;
3
4impl Client {
5    /// Asks the voice server for a token to join the call
6    pub async fn join_call(&self, id: impl Into<String>) -> Result<VoiceAuthenticationData> {
7        Ok(self
8            .client
9            .post(ep!(self, "/channels/{}/join_call", id.into()))
10            .auth(&self.authentication)
11            .send()
12            .await?
13            .process_error()
14            .await?
15            .json()
16            .await?)
17    }
18}