status upgrade
This commit is contained in:
@@ -22,6 +22,13 @@ pub struct Channel {
|
||||
pub cacheDuration: Option<u32>, //Some(86400)
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, Debug, Clone)]
|
||||
pub struct ChannelGroup {
|
||||
pub id: String,
|
||||
pub title: String,
|
||||
pub channels: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize)]
|
||||
pub struct ChannelOption {
|
||||
pub id: String, //"channels",
|
||||
@@ -126,3 +133,41 @@ impl Status {
|
||||
self.categories.push(category);
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize)]
|
||||
pub struct ChannelView {
|
||||
pub id: String,
|
||||
pub name: String,
|
||||
pub description: String,
|
||||
pub premium: bool,
|
||||
pub favicon: String,
|
||||
pub status: String,
|
||||
pub categories: Vec<String>,
|
||||
pub options: Vec<ChannelOption>,
|
||||
pub nsfw: bool,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub group: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub tags: Option<Vec<String>>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub cacheDuration: Option<u32>,
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize)]
|
||||
pub struct StatusResponse {
|
||||
pub id: String,
|
||||
pub name: String,
|
||||
pub subtitle: String,
|
||||
pub description: String,
|
||||
pub iconUrl: String,
|
||||
pub color: String,
|
||||
pub status: String,
|
||||
pub notices: Vec<Notice>,
|
||||
pub channels: Vec<ChannelView>,
|
||||
pub channelGroups: Vec<ChannelGroup>,
|
||||
pub subscription: Subscription,
|
||||
pub nsfw: bool,
|
||||
pub categories: Vec<String>,
|
||||
pub options: Vec<Options>,
|
||||
pub filtersFooter: String,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user