mirror of
https://github.com/mii443/vrchatapi-rust.git
synced 2025-08-22 15:45:35 +00:00
@ -1,12 +1,13 @@
|
||||
pub use vrchatapi::apis;
|
||||
|
||||
fn main() {
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let mut config = apis::configuration::Configuration::default();
|
||||
config.basic_auth = Some((String::from("username"), Some(String::from("password"))));
|
||||
|
||||
let me = apis::authentication_api::get_current_user(&config).unwrap();
|
||||
println!("Username: {}", me.username);
|
||||
let me = apis::authentication_api::get_current_user(&config).await.unwrap();
|
||||
println!("Username: {}", me.username.unwrap());
|
||||
|
||||
let online = apis::system_api::get_current_online_users(&config).unwrap();
|
||||
let online = apis::system_api::get_current_online_users(&config).await.unwrap();
|
||||
println!("Current Online Users: {}", online);
|
||||
}
|
Reference in New Issue
Block a user