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