use super::types::*;
use crate::{error::Result, http::HttpClient};
use std::sync::Arc;
pub struct CoursesApi {
http: Arc<HttpClient>,
}
impl CoursesApi {
pub fn new(http: Arc<HttpClient>) -> Self {
Self { http }
}
pub async fn list(&self, params: &GetCoursesParams) -> Result<GetCoursesResponse> {
self.http.get_with_query("/courses", params).await
}
}