use serde_json::Value;
use super::Endpoint;
#[derive(Debug, Default, Clone)]
pub struct ListTasks;
impl Endpoint for ListTasks {
type Output = Value;
fn method(&self) -> &'static str {
"GET"
}
fn path(&self) -> String {
"/api/tasks".into()
}
}
#[derive(Debug, Default, Clone)]
pub struct RunAllTasks;
impl Endpoint for RunAllTasks {
type Output = Value;
fn method(&self) -> &'static str {
"POST"
}
fn path(&self) -> String {
"/api/tasks/run".into()
}
}
#[derive(Debug, Default, Clone)]
pub struct GetTasksStatus;
impl Endpoint for GetTasksStatus {
type Output = Value;
fn method(&self) -> &'static str {
"GET"
}
fn path(&self) -> String {
"/api/tasks/status".into()
}
}