feat: dump user regions
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
/players*.json*
|
/players*.json*
|
||||||
/b50*.json*
|
/b50*.json*
|
||||||
|
/region*.json*
|
||||||
|
|
||||||
/.python-version
|
/.python-version
|
||||||
/uv.lock
|
/uv.lock
|
||||||
|
|||||||
@@ -119,6 +119,8 @@ pub enum Commands {
|
|||||||
ListAllUserDump {},
|
ListAllUserDump {},
|
||||||
#[cfg(feature = "fetchall")]
|
#[cfg(feature = "fetchall")]
|
||||||
ScrapeAllB50Dump {},
|
ScrapeAllB50Dump {},
|
||||||
|
#[cfg(feature = "fetchall")]
|
||||||
|
ScrapeAllRegionDump {},
|
||||||
|
|
||||||
Logout {
|
Logout {
|
||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
|
|||||||
@@ -321,6 +321,12 @@ async fn main() -> Result<(), Box<dyn snafu::Error>> {
|
|||||||
|
|
||||||
dump_cache::<GetUserRatingApiResp>("b50.json", B50)?;
|
dump_cache::<GetUserRatingApiResp>("b50.json", B50)?;
|
||||||
}
|
}
|
||||||
|
#[cfg(feature = "fetchall")]
|
||||||
|
Commands::ScrapeAllRegionDump {} => {
|
||||||
|
use crate::{cache::REGIONS, utils::helpers::dump_cache};
|
||||||
|
|
||||||
|
dump_cache::<GetUserRatingApiResp>("region.json", REGIONS)?;
|
||||||
|
}
|
||||||
|
|
||||||
Commands::Userdata { user_id } => {
|
Commands::Userdata { user_id } => {
|
||||||
let action = async |_| match Sdgb1_50::request::<_, GetUserDataApiResp>(
|
let action = async |_| match Sdgb1_50::request::<_, GetUserDataApiResp>(
|
||||||
|
|||||||
Reference in New Issue
Block a user