Add metadata GV loader api (#84)

* Add metadata GV loader api

* Register commands

* fix lint + docs issue
This commit is contained in:
Geometrically
2023-04-17 14:05:27 -07:00
committed by GitHub
parent 9f40640ed8
commit 19a4aa6689
6 changed files with 73 additions and 1 deletions

View 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)
}

View File

@@ -1,6 +1,7 @@
//! API for interacting with Theseus
pub mod auth;
pub mod jre;
pub mod metadata;
pub mod pack;
pub mod process;
pub mod profile;
@@ -19,7 +20,7 @@ pub mod prelude {
pub use crate::{
auth::{self, Credentials},
data::*,
jre, pack, process,
jre, metadata, pack, process,
profile::{self, Profile},
profile_create, settings,
state::JavaGlobals,