mirror of
https://github.com/ALEZ-DEV/Babylonia-terminal.git
synced 2025-12-16 09:28:53 +00:00
2 hours for this commit, I know I'm dumb
This commit is contained in:
parent
c60ad6a587
commit
2c997938c4
15
babylonia-terminal-cli/Cargo.lock
generated
15
babylonia-terminal-cli/Cargo.lock
generated
@ -38,6 +38,19 @@ version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
|
||||
|
||||
[[package]]
|
||||
name = "async-compression"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "07dbbf24db18d609b1462965249abdf49129ccad073ec257da372adc83259c60"
|
||||
dependencies = [
|
||||
"flate2",
|
||||
"futures-core",
|
||||
"memchr",
|
||||
"pin-project-lite",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.2.0"
|
||||
@ -1131,6 +1144,7 @@ version = "0.12.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2d66674f2b6fb864665eea7a3c1ac4e3dfacd2fda83cf6f935a612e01b0e3338"
|
||||
dependencies = [
|
||||
"async-compression",
|
||||
"base64",
|
||||
"bytes",
|
||||
"encoding_rs",
|
||||
@ -1159,6 +1173,7 @@ dependencies = [
|
||||
"system-configuration",
|
||||
"tokio",
|
||||
"tokio-native-tls",
|
||||
"tokio-util",
|
||||
"tower-service",
|
||||
"url",
|
||||
"wasm-bindgen",
|
||||
|
||||
15
babylonia-terminal-sdk/Cargo.lock
generated
15
babylonia-terminal-sdk/Cargo.lock
generated
@ -38,6 +38,19 @@ version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
|
||||
|
||||
[[package]]
|
||||
name = "async-compression"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "07dbbf24db18d609b1462965249abdf49129ccad073ec257da372adc83259c60"
|
||||
dependencies = [
|
||||
"flate2",
|
||||
"futures-core",
|
||||
"memchr",
|
||||
"pin-project-lite",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.2.0"
|
||||
@ -992,6 +1005,7 @@ version = "0.12.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2d66674f2b6fb864665eea7a3c1ac4e3dfacd2fda83cf6f935a612e01b0e3338"
|
||||
dependencies = [
|
||||
"async-compression",
|
||||
"base64",
|
||||
"bytes",
|
||||
"encoding_rs",
|
||||
@ -1020,6 +1034,7 @@ dependencies = [
|
||||
"system-configuration",
|
||||
"tokio",
|
||||
"tokio-native-tls",
|
||||
"tokio-util",
|
||||
"tower-service",
|
||||
"url",
|
||||
"wasm-bindgen",
|
||||
|
||||
@ -12,7 +12,7 @@ dotenv = "0.15.0"
|
||||
downloader = { git = "https://github.com/ALEZ-DEV/downloader" } # version = "0.2.7",
|
||||
flate2 = "1.0.28"
|
||||
log = "0.4.21"
|
||||
reqwest = "0.12.2"
|
||||
reqwest = { version = "0.12.2", features = ["gzip"] }
|
||||
serde = { version = "1.0.197", features = ["derive"] }
|
||||
serde_json = "1.0.115"
|
||||
tar = "0.4.40"
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
use log::debug;
|
||||
use reqwest::header::USER_AGENT;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
@ -95,15 +96,16 @@ pub struct SampleHashInfo {
|
||||
|
||||
// end data ---------------------------------------------------------------------
|
||||
|
||||
static URL: &str =
|
||||
concat!("https://prod-alicdn-gamestarter.k", "uro", "gam", "e.com/pcstarter/prod/game/G143/4/index.json");
|
||||
static URL: &str = concat!(
|
||||
"https://prod-alicdn-gamestarter.k",
|
||||
"uro",
|
||||
"gam",
|
||||
"e.com/pcstarter/prod/game/G143/4/index.json"
|
||||
);
|
||||
|
||||
pub async fn fetch_game_info() -> anyhow::Result<GameInfo> {
|
||||
let response = reqwest::get(URL).await?;
|
||||
debug!("{:?}", response.headers());
|
||||
response.headers_mut().
|
||||
let body = response.text().await?;
|
||||
debug!("{}", &body);
|
||||
Ok(serde_json::from_str(&body)?)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user