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
60
61
62
63
64
65
//! # Eludrs
//!
//! A simple asynchronous wrapper for the Eludris API
//!
//! ## Installation
//!
//! Just run the following command:
//!
//! ```sh
//! cargo add --git https://github.com/eludris-community/eludrs
//! ```
//!
//! > **Note**
//! > You may be wondering why this is not on crates.io, that's because Eludris is
//! > still in early development stages, expect a release when Eludris is more stable.
//!
//! ## Example
//!
//! While an API wrapper has many uses, here's an example of what most people will
//! end up using this for, making Bots:
//!
//! ```ignore
//! # use eludrs::HttpClient;
//! # use futures::stream::StreamExt;
//!
//! # #[tokio::main]
//! # async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
//! let mut http = HttpClient::new().name("Uwuki".to_string());
//! let gateway = http.create_gateway().await?; // uses the InstanceInfo of the instance
//! let mut events = gateway.get_events().await.unwrap();
//!
//! while let Some(msg) = events.next().await {
//! if msg.content == "!ping" {
//! http.send("Pong").await.unwrap();
//! }
//! }
//! # Ok(())
//! # }
//! ```
//!
//! ## Docs
//!
//! If you want documentation you can currently get that by going to your project
//! and running
//!
//! ```shell
//! cargo doc -p eludrs --open
//! ```
pub use ;
pub use HttpClient;
/// All the todel models re-exported
/// The default rest url
pub const REST_URL: &str = "https://eludris.tooty.xyz";
/// The default gateway url
pub const GATEWAY_URL: &str = "wss://eludris.tooty.xyz/ws/";