It's my C++ project aternosapi, but rewritten in Rust. aternosapi is a library meant to control aternos-hosted servers programmatically using Rust. Remember, this breaks Aternos' TOS for automation, you can be banned.
- Log into an existing aternos account
- List available servers for said account
- Start/stop servers
- Retrieve statuses of servers
- View players inside of server
- Query a specific server to access
You can add this project as a dependency with
cargo add --git "https://github.com/SuspiciousDuck/aternosapi-rust"Afterwards, you're free to use it as you please.
Here's an example executable:
fnmain(){letmut aternos = aternosapi::Instance::new();let result = aternos.login("username","password");if result.is_err(){println!("Error signing in: {}", result.err().unwrap());
std::process::exit(1);}
aternos.fetch_servers();println!("{} Servers", aternos.servers.len());for server in aternos.servers{println!("Server: {}, id: {}", server.title, server.id);}}