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