summaryrefslogtreecommitdiff
path: root/src/apis
diff options
context:
space:
mode:
Diffstat (limited to 'src/apis')
-rw-r--r--src/apis/modrinth.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/apis/modrinth.rs b/src/apis/modrinth.rs
index 14ff266..fb3952d 100644
--- a/src/apis/modrinth.rs
+++ b/src/apis/modrinth.rs
@@ -127,7 +127,7 @@ pub enum GameVersionType {
127 release, 127 release,
128 snapshot, 128 snapshot,
129 alpha, 129 alpha,
130 beta 130 beta,
131} 131}
132 132
133async fn get(api: &str, path: &str) -> Result<Option<Vec<u8>>, Box<dyn std::error::Error>> { 133async fn get(api: &str, path: &str) -> Result<Option<Vec<u8>>, Box<dyn std::error::Error>> {
@@ -208,7 +208,10 @@ pub fn extract_current_version(versions: Vec<Version>) -> MLE<String> {
208} 208}
209 209
210pub async fn get_game_versions() -> Vec<GameVersion> { 210pub async fn get_game_versions() -> Vec<GameVersion> {
211 let data = get("https://api.modrinth.com/v2/", "tag/game_version").await.unwrap().unwrap(); 211 let data = get("https://api.modrinth.com/v2/", "tag/game_version")
212 .await
213 .unwrap()
214 .unwrap();
212 215
213 serde_json::from_slice(&data).unwrap() 216 serde_json::from_slice(&data).unwrap()
214} 217}