async_openai_alt/
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 pub async fn get<Q>(&self, query: &Q) -> Result<ListAuditLogsResponse, OpenAIError>
19 where
20 Q: Serialize + ?Sized,
21 {
22 self.client
23 .get_with_query("/organization/audit_logs", query)
24 .await
25 }
26}