mvm/server/
vanilla.rs

1//! This submodule provides structures and types for parsing JSON responses from Mojang's Minecraft version API.
2
3use serde::Deserialize;
4
5#[derive(Deserialize, Debug)]
6pub struct Latest {
7    pub release: String
8}
9
10#[derive(Deserialize, Debug)]
11pub struct VanillaVersions {
12    pub latest: Latest,
13    pub versions: Vec<VanillaVersionInfo>
14}
15
16#[derive(Deserialize, Debug)]
17pub struct VanillaVersionInfo {
18    pub id: String,
19    pub url: String
20}
21
22pub type VanillaDownloadLink = String;
23
24#[derive(Deserialize, Debug)]
25pub struct VanillaDownloadInfo {
26    pub url: VanillaDownloadLink
27}
28#[derive(Deserialize, Debug)]
29pub struct ServerDownload {
30    pub server: VanillaDownloadInfo
31}
32#[derive(Deserialize, Debug)]
33pub struct VersionDownloads {
34    pub downloads: ServerDownload
35}