#![allow(
clippy::too_many_arguments,
clippy::wildcard_imports,
clippy::doc_markdown
)]
use crate::client::AccountClient;
use crate::error::Error;
use crate::generated::routes;
#[allow(unused_imports)]
use crate::generated::types::*;
use crate::pagination::Page;
#[derive(Debug, Clone, Default, PartialEq)]
pub struct GetProjectTimelineParams {
pub page: Option<i32>,
}
#[derive(Debug, Clone, Copy)]
pub struct TimelineService<'a> {
client: &'a AccountClient,
}
impl<'a> TimelineService<'a> {
pub(crate) fn new(client: &'a AccountClient) -> Self {
Self { client }
}
pub fn client(&self) -> &'a AccountClient {
self.client
}
pub async fn project_timeline(
&self,
project_id: i64,
params: &GetProjectTimelineParams,
) -> Result<Page<GetProjectTimelineResponseContent>, Error> {
let mut operation = self
.client
.operation(&routes::GET_PROJECT_TIMELINE, &[&project_id]);
operation.query_optional("page", params.page.as_ref());
self.client.send_page(operation).await
}
}