Compare commits
3 commits
5d05eebd89
...
dba739db29
Author | SHA1 | Date | |
---|---|---|---|
|
dba739db29 | ||
|
dcf66cfb2c | ||
|
7b7f1c6fa1 |
3 changed files with 521 additions and 262 deletions
769
Cargo.lock
generated
769
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
10
Cargo.toml
10
Cargo.toml
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "rustyfox"
|
name = "rustyfox"
|
||||||
description = "A client for https://furaffinity-api.herokuapp.com"
|
description = "A client for https://furaffinity-api.herokuapp.com"
|
||||||
version = "0.1.0"
|
version = "0.2-rc1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
repository = "https://git.doggoat.de/dhalucario/rustyfox.git"
|
repository = "https://git.doggoat.de/dhalucario/rustyfox.git"
|
||||||
homepage = "https://furaffinity-api.herokuapp.com"
|
homepage = "https://furaffinity-api.herokuapp.com"
|
||||||
|
@ -9,8 +9,12 @@ license = "MIT"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
reqwest = { version = "0.12", features = ["json"] }
|
reqwest = { version = "^0.12", default-features = false, features = ["charset", "http2", "system-proxy", "json"] }
|
||||||
tokio = { version = "1.43", features = ["full", "rt-multi-thread"]}
|
tokio = { version = "1.43", features = ["full", "rt-multi-thread"]}
|
||||||
serde = { version = "1.0", features = ["default", "derive"]}
|
serde = { version = "1.0", features = ["default", "derive"]}
|
||||||
serde_json = { version = "1.0", features = ["default", "std", "alloc"]}
|
|
||||||
chrono = { version = "0.4", features = ["serde"] }
|
chrono = { version = "0.4", features = ["serde"] }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["native-tls"]
|
||||||
|
rustls-tls = ["reqwest/rustls-tls"]
|
||||||
|
native-tls = ["reqwest/native-tls"]
|
||||||
|
|
|
@ -46,8 +46,6 @@ impl Client {
|
||||||
if res.status() != reqwest::StatusCode::OK {
|
if res.status() != reqwest::StatusCode::OK {
|
||||||
bail!(res.status());
|
bail!(res.status());
|
||||||
};
|
};
|
||||||
//File::create("./out.json")?.write(res.text().await?.as_bytes())?;
|
Ok(res.json().await?)
|
||||||
let submission: Submission = res.json().await?;
|
|
||||||
Ok(submission)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue