schul-cloud-api 0.2.0

Library providing an interface to talk to the schul.cloud api
Documentation
use serde::{Deserialize, Serialize};
use serde_json::Value;

#[derive(Serialize, Deserialize, Clone, Debug, Hash, PartialEq, Eq)]
pub struct Channel {
    pub id: String,
    pub name: String,
    pub description: Option<String>,
    pub image: Option<String>,
    pub company: Option<String>,
    pub r#type: Option<String>,
    pub visible: bool,
    pub password: Option<bool>,
    pub encrypted: bool,
    pub encryption: Option<String>,
    pub last_action: Option<String>,
    pub last_activity: Option<String>,
    pub can_leave: bool,
    pub ldap_name: Option<Value>,
    pub group_id: Option<Value>,
    pub show_membership_activities: bool,
    pub show_activities: bool,
    pub crypto_properties: Option<Value>,
    pub unique_identifier: Option<Value>,
    pub user_count: u64,
    pub pending_count: u64,
    pub request_count: u64,
    pub num_members_without_keys: u64,
    pub key: Option<String>,
    pub key_requested: Option<Value>,
    pub manager: bool,
    pub writable: String,
    pub inviteable: String,
    pub membership: ChannelMembership,
    pub favorite: bool,
    pub unread: u64,
    pub key_signature: Option<Value>,
    pub key_sender: Option<Value>,
    pub signature_expiry: Option<Value>,
    pub mx_room_user_status: Option<Value>,
    pub mx_room_id: Option<String>,
    pub mx_room_alias: Option<Value>,
    pub mx_room_server_status: Option<Value>,
    pub federated: bool,
}

#[derive(Serialize, Deserialize, Clone, Debug, Hash, PartialEq, Eq)]
pub struct ChannelMembership {
    pub is_member: bool,
    pub invited_at: Value,
    pub invited_by: Value,
    pub invited_by_mx_user_id: Value,
    pub joined: String,
    pub confirmation: String,
    pub may_manage: bool,
    pub write: bool,
    pub muted: Value,
}