mirror of
https://codeberg.org/icewind/ugc-scaper.git
synced 2026-06-03 10:14:11 +02:00
cleanups, tests, clippy
This commit is contained in:
parent
d937dbbb5e
commit
a9a3751067
16 changed files with 5932 additions and 117 deletions
18
examples/test.rs
Normal file
18
examples/test.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
use main_error::MainResult;
|
||||
use std::env::args;
|
||||
use steamid_ng::SteamID;
|
||||
use ugc_scraper::UgcClient;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> MainResult {
|
||||
let client = UgcClient::new();
|
||||
let id = args().nth(1).expect("no steam id provided");
|
||||
let id = SteamID::try_from(id.as_str()).expect("invalid steam id provided");
|
||||
let player = client.player(id).await?;
|
||||
dbg!(player.teams);
|
||||
|
||||
let membership = client.player_team_history(id).await?;
|
||||
dbg!(membership);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue