async_openai/
audit_logs.rs1use serde::Serialize;
2
3use crate::{
4 config::Config, error::OpenAIError, types::admin::audit_logs::ListAuditLogsResponse, Client,
5};
6
7pub struct AuditLogs<'c, C: Config> {
11 client: &'c Client<C>,
12}
13
14impl<'c, C: Config> AuditLogs<'c, C> {
15 pub fn new(client: &'c Client<C>) -> Self {
16 Self { client }
17 }
18
19 #[crate::byot(T0 = serde::Serialize, R = serde::de::DeserializeOwned)]
21 pub async fn get<Q>(&self, query: &Q) -> Result<ListAuditLogsResponse, OpenAIError>
22 where
23 Q: Serialize + ?Sized,
24 {
25 self.client
26 .get_with_query("/organization/audit_logs", &query)
27 .await
28 }
29}