1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! # libellule
//!
//! The `libellule` crate provides a fast, type-safe PRONTE [`Client`].
//!
//! ## Example
//!
//! Add libellule as a dependency in your Cargo.toml:
//!
//! ```toml
//! [dependencies]
//! libellule = "0.1"
//! tokio = { version = "1", features = ["full"] }
//! ```
//!
//! And here is a usage example to get you started:
//!
//! ```rust
//! use libellule::{Client, Instance};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let instance_url = String::from("https://demo.index-education.net/pronote/");
//! let instance = Instance::new(instance_url).await?;
//! let username = "demonstration";
//! let password = "pronotevs";
//!
//! let client = Client::login(&instance, username, password).await?;
//!
//! let periods = client.periods();
//! let default_period_id = client.default_period();
//! let default_period = periods
//! .iter()
//! .find(|period| period.id == default_period_id)
//! .unwrap();
//!
//! let grades = client.grades(default_period).await?;
//!
//! println!("{:#?}", grades);
//!
//! Ok(())
//! }
//! ```
/// Error types used within the library.
/// Improved representation of PRONOTE return types.
pub use *;
pub use *;