#![allow(missing_docs, unreachable_pub, clippy::all, clippy::pedantic)]
use crate::client::Client;
use crate::error::Error;
use crate::generated::routes;
use crate::generated::types::*;
use crate::pagination::Page;
#[derive(Debug, Clone, Default, PartialEq)]
pub struct ListClipsParams {
pub page: Option<String>,
}
pub struct Clips<'a> {
client: &'a Client,
}
impl<'a> Clips<'a> {
pub(crate) fn new(client: &'a Client) -> Self {
Self { client }
}
pub fn client(&self) -> &'a Client {
self.client
}
pub async fn list(
&self,
params: &ListClipsParams,
) -> Result<Page<ListClipsResponseContent>, Error> {
let mut operation = self.client.operation(&routes::LIST_CLIPS, &[]);
operation.query_optional("page", params.page.as_ref());
self.client.send_page(operation).await
}
}