3 releases
new 0.1.5 | Dec 21, 2024 |
---|---|
0.1.4 | Dec 20, 2024 |
#632 in Web programming
460 downloads per month
80KB
2K
SLoC
nadeo-api
A library to making using the Nadeo API easy.
use nadeo_api_rs::{prelude::*, user_agent_auto};
Usage
- Create a
NadeoCredentials
. - Create a
UserAgentDetails
-- easiest way viauser_agent_auto!
macro. - Create a
NadeoClient
viaNadeoClient::create
. - Call methods like
let cotd = client.get_cup_of_the_day()?;
For lower-level access, see NadeoApiClient::run_*
methods.
For examples of how to do more complex low-level requests, see LiveApiClient::get_map_group_leaderboard
for an example.
lib.rs
:
Create a NadeoClient to interact with the Nadeo API.
Use NadeoClient::create to create a new client.
You will also need to create NadeoCredentials and UserAgentDetails (see auth::UserAgentDetails::new_autodetect)
API methods are defined on traits: live::LiveApiClient, meet::MeetApiClient, core::CoreApiClient.
Dependencies
~9–20MB
~272K SLoC