aboutsummaryrefslogtreecommitdiff
path: root/common/src
diff options
context:
space:
mode:
Diffstat (limited to 'common/src')
-rw-r--r--common/src/api.rs17
-rw-r--r--common/src/routes.rs4
2 files changed, 18 insertions, 3 deletions
diff --git a/common/src/api.rs b/common/src/api.rs
index 2123477..ee26020 100644
--- a/common/src/api.rs
+++ b/common/src/api.rs
@@ -14,10 +14,12 @@ fields! {
QUERY_SORT_ASCENDING: () = 2003 "sort_ascending";
VIEW_TITLE: &str = 2005 "title";
- VIEW_MESSAGE: &str = 2010 "message";
+ VIEW_MESSAGE: Object = 2010 "message";
VIEW_NODE_PAGE: Object = 2011 "node_page";
VIEW_NODE_LIST: Object = 2012 "node_list"; // multi
VIEW_PLAYER: u64 = 2028 "player";
+ VIEW_STATGROUP: Object = 2041 "statgroup";
+ VIEW_STATTEXT: Object = 2042 "stattext";
NKU_NODE: Object = 2025 "node";
NKU_UDATA: Object = 2026 "udata";
@@ -26,6 +28,19 @@ fields! {
NODELIST_TITLE: &str = 2007 "title";
NODELIST_DISPLAYSTYLE: &str = 2008 "displaystyle";
NODELIST_ITEM: &str = 2009 "item";
+
+ MESSAGE_KIND: &str = 2029 "kind";
+ MESSAGE_TEXT: &str = 2030 "text";
+
+ STATGROUP_TITLE: &str = 2039 "title";
+ STATGROUP_BIN: Object = 2040 "bin";
+
+ STAT_NAME: &str = 2038 "name";
+ STAT_COUNT: u64 = 2031 "count";
+ STAT_TOTAL_SIZE: u64 = 2032 "total_size";
+ STAT_TOTAL_DURATION: f64 = 2033 "total_duration";
+ STAT_MAX_SIZE: u64 = 2036 "max_size";
+ STAT_MAX_DURATION: f64 = 2037 "max_duration";
}
enums! {
diff --git a/common/src/routes.rs b/common/src/routes.rs
index 48f975a..1d3a8da 100644
--- a/common/src/routes.rs
+++ b/common/src/routes.rs
@@ -18,8 +18,8 @@ pub fn u_node_slug_player(node: &str) -> String {
pub fn u_node_slug_player_time(node: &str, time: f64) -> String {
format!("/n/{node}/player?t={time}")
}
-pub fn u_node_image(node: &str, slot: &str, size: usize) -> String {
- format!("/n/{node}/image/{slot}?size={size}")
+pub fn u_image(path: &str, size: usize) -> String {
+ format!("/image/{path}?size={size}")
}
pub fn u_node_slug_watched(node: &str, state: &str) -> String {
format!("/n/{node}/watched?state={state}")