Expand description
§api_free_reseau_fr
§Rust client for interacting with free-reseau.fr API
§Feature
- Async (reqwest)
- serde (feature flag)
§Usage
use api_free_reseau_fr::{Client, DSLAM, Error};
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Error> {
let client = Client::new();
let target = DSLAM::new("mon", 75, 1);
//or
let target = DSLAM::from("mon75-1");
let status = client.get_dslam_status(&target).await?;
println!("DSLAM `{target}` is {status}");
Ok(())
}More examples provided in the demo
§License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
§Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
See CONTRIBUTING.md.
Structs§
- Client
- API Client. Can be also build from a
reqwest::Client - DSLAM
- Store a DSLAM String. For example:
mon75-1 - Departement
- Store a Departement. For example:
75 - NRA
- Store a NRA as a String. For example:
mon75 - Request
- Request send by the
Client
Enums§
- DSLAM
Status - Status of a
DSLAM - Departement
Status - Status of a
Departement - Error
- Returned by the
Clientis a error occured - NRAStatus
- Status of a
NRA - Response
- Result of a API request
- Target
Type - Represent the 3 types of request possible