feat: B50 fetchall impl

This commit is contained in:
mokurin000
2025-08-02 19:56:30 +08:00
parent 84edce688d
commit 957166d8f4
3 changed files with 40 additions and 7 deletions

View File

@@ -264,10 +264,22 @@ async fn main() -> Result<(), Box<dyn snafu::Error>> {
#[cfg(feature = "fetchall")]
Commands::ScrapeAllB50 { concurrency } => {
use sdgb_api::title::methods;
use crate::{
cache::PLAYERS,
utils::helpers::{cached_concurrent_fetch, read_cache},
cache::{PLAYER_B50, PLAYERS},
utils::helpers::{cached_concurrent_fetch, read_cache_keys},
};
let user_ids = read_cache_keys(PLAYERS)?;
cached_concurrent_fetch::<methods::GetUserRatingApi>(
user_ids,
&client,
concurrency,
PLAYER_B50,
)
.await?;
}
Commands::Userdata { user_id } => {