2022-03-26 23:53:27 +01:00
|
|
|
use reqwest::Client;
|
2022-01-30 22:18:09 +01:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
|
|
|
#[derive(Deserialize)]
|
|
|
|
pub struct Request {
|
|
|
|
pub repo: Repository,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Deserialize)]
|
|
|
|
pub struct Repository {
|
2022-03-23 21:18:35 +01:00
|
|
|
pub config_path: String,
|
2022-01-30 22:18:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Serialize)]
|
|
|
|
pub struct Response {
|
|
|
|
pub data: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Clone)]
|
2022-03-26 23:53:27 +01:00
|
|
|
pub struct APIConfig(pub Client);
|
2022-01-30 22:18:09 +01:00
|
|
|
|
|
|
|
impl Request {
|
2022-03-23 21:18:35 +01:00
|
|
|
pub fn config(&self) -> String {
|
|
|
|
self.repo.config_path.clone()
|
|
|
|
}
|
2022-01-30 22:18:09 +01:00
|
|
|
}
|