use crate::client::AriClient;
use crate::error::Result;
#[derive(Debug, Clone, serde::Deserialize)]
pub struct SoundFormat {
pub language: String,
pub format: String,
}
#[derive(Debug, Clone, serde::Deserialize)]
pub struct Sound {
pub id: String,
#[serde(default)]
pub text: String,
#[serde(default)]
pub formats: Vec<SoundFormat>,
}
pub async fn list(client: &AriClient) -> Result<Vec<Sound>> {
client.get("/sounds").await
}
pub async fn get(client: &AriClient, sound_id: &str) -> Result<Sound> {
client.get(&format!("/sounds/{sound_id}")).await
}