use reqwest::Method;
use crate::api::{decode_response, ErrorKind};
use crate::client::Client;
use crate::error::Error;
use crate::models::logs::{LogsQuery, LogsResponse};
impl Client {
pub async fn get_logs(&self, query: &LogsQuery) -> Result<LogsResponse, Error> {
let response = self
.request(Method::GET, "sms/3/logs")?
.query(query)
.send()
.await?;
decode_response(response, ErrorKind::Rich).await
}
}