Model euphoria api

This commit is contained in:
Joscha 2022-06-18 23:42:33 +02:00
parent 03dfe10f3e
commit de7815f653
9 changed files with 702 additions and 1 deletions

24
cove-tui/src/euph/api.rs Normal file
View file

@ -0,0 +1,24 @@
//! Models the euphoria API at <http://api.euphoria.io/>.
mod events;
mod room_cmds;
mod session_cmds;
mod types;
use serde::{Deserialize, Serialize};
use serde_json::Value;
pub use events::*;
pub use room_cmds::*;
pub use session_cmds::*;
pub use types::*;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Packet {
pub id: Option<String>,
pub r#type: PacketType,
pub data: Option<Value>,
pub error: Option<String>,
pub throttled: Option<bool>,
pub throttled_reason: Option<String>,
}