added substitutions endpoints
This commit is contained in:
8 files changed
+60
-7
No files matched your search
@@ -0,0 +1,9 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "PascalCase")]
|
||||
pub struct ApiInfo {
|
||||
pub api_version: String,
|
||||
pub application_version: String,
|
||||
pub base_url: String,
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::{ApiInfo, Endpoint};
|
||||
|
||||
pub const API_V3_INFO_ENDPOINT: Endpoint<(), ApiInfo> = Endpoint::Get {
|
||||
url: "/api/3",
|
||||
auth: false,
|
||||
_types: PhantomData,
|
||||
};
|
||||
|
||||
pub const APIS_INFO_ENDPOINT: Endpoint<(), Vec<ApiInfo>> = Endpoint::Get {
|
||||
url: "/api",
|
||||
auth: false,
|
||||
_types: PhantomData,
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
mod api_info;
|
||||
mod endpoints;
|
||||
|
||||
pub use api_info::*;
|
||||
pub use endpoints::*;
|
||||
Reference in new issue
Block a user