gleetube/resource/comments
Types
Filter for comments.list.
pub type CommentFilter {
ById(ids: List(String))
ByParentId(parent_id: String)
}
Constructors
-
ById(ids: List(String)) -
ByParentId(parent_id: String)
Valid part values for the comments resource.
pub type CommentPart {
Id
Snippet
}
Constructors
-
Id -
Snippet
Moderation status for comments.
pub type ModerationStatus {
HeldForReview
Published
Rejected
}
Constructors
-
HeldForReview -
Published -
Rejected
Text format for comment display.
pub type TextFormat {
Html
PlainText
}
Constructors
-
Html -
PlainText
Values
pub fn delete(
client: client.Client,
comment_id comment_id: String,
) -> Result(Nil, error.GleeTubeError)
Delete a comment.
pub fn insert(
client: client.Client,
parts parts: List(CommentPart),
body body: json.Json,
) -> Result(comment.Comment, error.GleeTubeError)
Insert a new comment (reply to an existing comment).
pub fn list(
client: client.Client,
parts parts: List(CommentPart),
filter filter: CommentFilter,
max_results max_results: option.Option(Int),
text_format text_format: option.Option(TextFormat),
page_token page_token: option.Option(String),
) -> Result(comment.CommentListResponse, error.GleeTubeError)
List comments matching the given filter.
pub fn list_all(
client: client.Client,
parts parts: List(CommentPart),
filter filter: CommentFilter,
text_format text_format: option.Option(TextFormat),
) -> Result(List(comment.Comment), error.GleeTubeError)
Fetch all comments across all pages.
pub fn mark_as_spam(
client: client.Client,
comment_id comment_id: String,
) -> Result(Nil, error.GleeTubeError)
Mark a comment as spam (deprecated as of 2023-09-12).
pub fn set_moderation_status(
client: client.Client,
comment_ids comment_ids: List(String),
moderation_status moderation_status: ModerationStatus,
ban_author ban_author: option.Option(Bool),
) -> Result(Nil, error.GleeTubeError)
Set the moderation status of one or more comments.
pub fn update(
client: client.Client,
parts parts: List(CommentPart),
body body: json.Json,
) -> Result(comment.Comment, error.GleeTubeError)
Update a comment.