mirror of
https://github.com/tribufu/tribufu-rust
synced 2026-06-01 09:42:37 +00:00
Add games routes
This commit is contained in:
parent
5815e1bd7c
commit
f42a1cdebe
9 changed files with 236 additions and 114 deletions
|
|
@ -11,8 +11,13 @@ async fn main() {
|
|||
let client_id = env::var("CLIENT_ID").unwrap().parse::<u64>().unwrap();
|
||||
let client_secret = env::var("CLIENT_SECRET").unwrap();
|
||||
|
||||
let client = TribufuClient::new(client_id, client_secret).unwrap();
|
||||
let token = client.get_token().await.unwrap();
|
||||
let mut client = TribufuClient::new(client_id, client_secret).unwrap();
|
||||
|
||||
println!("{:?}", token)
|
||||
client.get_token(None).await.unwrap();
|
||||
|
||||
let games = client.get_games().await.unwrap();
|
||||
|
||||
games.iter().for_each(|game| {
|
||||
println!("{}", game.name);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue