use crate::agent::AgentService;
use crate::build::BuildService;
use crate::http::HttpClient;
use crate::organization::OrganizationService;
use crate::pipeline::PipelineService;
pub struct Client {
client: HttpClient,
}
impl Client {
pub fn new(token: &str) -> Self {
Client {
client: HttpClient::new(token.to_string()),
}
}
pub fn organization<'a>(&'a self) -> OrganizationService {
OrganizationService::new(&self.client)
}
pub fn agent<'a>(&'a self) -> AgentService {
AgentService::new(&self.client)
}
pub fn build<'a>(&'a self) -> BuildService {
BuildService::new(&self.client)
}
pub fn pipeline<'a>(&'a self) -> PipelineService {
PipelineService::new(&self.client)
}
}