3 releases

new 0.1.5 Dec 21, 2024
0.1.4 Dec 20, 2024

#632 in Web programming

Download history 460/week @ 2024-12-14

460 downloads per month

Unlicense

80KB
2K SLoC

nadeo-api

A library to making using the Nadeo API easy.

use nadeo_api_rs::{prelude::*, user_agent_auto};

Usage

  1. Create a NadeoCredentials.
  2. Create a UserAgentDetails -- easiest way via user_agent_auto! macro.
  3. Create a NadeoClient via NadeoClient::create.
  4. 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