1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-21 00:45:18 +00:00

Add support for movie posts

This commit is contained in:
2020-07-03 16:41:14 +02:00
parent b858eac3c4
commit d632d0b888
11 changed files with 109 additions and 11 deletions

View File

@ -19,4 +19,5 @@ pub mod group_member;
pub mod global_search_result;
pub mod friend;
pub mod friendship_status;
pub mod post;
pub mod post;
pub mod movie;

14
src/data/movie.rs Normal file
View File

@ -0,0 +1,14 @@
//! # Movie information
//!
//! @author Pierre Hubert
use crate::data::user::UserID;
pub struct Movie {
pub id: u64,
pub user_id: UserID,
pub name: String,
pub uri: String,
pub file_type: String,
pub size: usize,
}

View File

@ -56,7 +56,7 @@ pub enum PostKind {
POST_KIND_IMAGE(PostFile),
POST_KIND_WEBLINK(PostWebLink),
POST_KIND_PDF(PostFile),
POST_KIND_MOVIE,
POST_KIND_MOVIE(u64), // The ID of the movie
POST_KIND_COUNTDOWN,
POST_KIND_SURVEY,
POST_KIND_YOUTUBE,
@ -69,7 +69,7 @@ impl PostKind {
PostKind::POST_KIND_IMAGE(_) => "image",
PostKind::POST_KIND_WEBLINK(_) => "weblink",
PostKind::POST_KIND_PDF(_) => "pdf",
PostKind::POST_KIND_MOVIE => "movie",
PostKind::POST_KIND_MOVIE(_) => "movie",
PostKind::POST_KIND_COUNTDOWN => "countdown",
PostKind::POST_KIND_SURVEY => "survey",
PostKind::POST_KIND_YOUTUBE => "youtube",