You've already forked AstralRinth
forked from didirus/AstralRinth
Add metadata GV loader api (#84)
* Add metadata GV loader api * Register commands * fix lint + docs issue
This commit is contained in:
27
theseus/src/api/metadata.rs
Normal file
27
theseus/src/api/metadata.rs
Normal file
@@ -0,0 +1,27 @@
|
||||
use crate::State;
|
||||
pub use daedalus::minecraft::VersionManifest;
|
||||
pub use daedalus::modded::Manifest;
|
||||
|
||||
#[tracing::instrument]
|
||||
pub async fn get_minecraft_versions() -> crate::Result<VersionManifest> {
|
||||
let state = State::get().await?;
|
||||
let tags = state.metadata.minecraft.clone();
|
||||
|
||||
Ok(tags)
|
||||
}
|
||||
|
||||
#[tracing::instrument]
|
||||
pub async fn get_fabric_versions() -> crate::Result<Manifest> {
|
||||
let state = State::get().await?;
|
||||
let tags = state.metadata.fabric.clone();
|
||||
|
||||
Ok(tags)
|
||||
}
|
||||
|
||||
#[tracing::instrument]
|
||||
pub async fn get_forge_versions() -> crate::Result<Manifest> {
|
||||
let state = State::get().await?;
|
||||
let tags = state.metadata.forge.clone();
|
||||
|
||||
Ok(tags)
|
||||
}
|
||||
Reference in New Issue
Block a user