mirror of
https://codeberg.org/icewind/ugc-scaper.git
synced 2026-06-03 10:14:11 +02:00
25 lines
505 B
Markdown
25 lines
505 B
Markdown
# ugc-scraper
|
|
|
|
_We have ugc api at home_
|
|
|
|
## Usage
|
|
|
|
```rust
|
|
use ugc_scraper::{Result, SteamID, UgcClient};
|
|
|
|
#[tokio::main]
|
|
async fn main() -> Result<()> {
|
|
let client = UgcClient::new();
|
|
let id = SteamID::from_steam64(76561198024494988).unwrap();
|
|
let player = client.player(id).await?;
|
|
println!("{}", player.name);
|
|
for team in player.teams {
|
|
println!(
|
|
" {} playing {} since {}",
|
|
team.team.name, team.league, team.since
|
|
)
|
|
}
|
|
|
|
Ok(())
|
|
}
|
|
```
|