gleetube/resource/comment_threads

Types

Filter for commentThreads.list.

pub type CommentThreadFilter {
  ByAllThreadsRelatedToChannelId(channel_id: String)
  ByChannelId(channel_id: String)
  ById(ids: List(String))
  ByVideoId(video_id: String)
}

Constructors

  • ByAllThreadsRelatedToChannelId(channel_id: String)
  • ByChannelId(channel_id: String)
  • ById(ids: List(String))
  • ByVideoId(video_id: String)

Order for comment threads.

pub type CommentThreadOrder {
  Time
  Relevance
}

Constructors

  • Time
  • Relevance

Valid part values for the commentThreads resource.

pub type CommentThreadPart {
  Id
  Snippet
  Replies
}

Constructors

  • Id
  • Snippet
  • Replies

Values

pub fn insert(
  client: client.Client,
  parts parts: List(CommentThreadPart),
  body body: json.Json,
) -> Result(comment_thread.CommentThread, error.GleeTubeError)

Insert a new comment thread (top-level comment on a video).

pub fn list(
  client: client.Client,
  parts parts: List(CommentThreadPart),
  filter filter: CommentThreadFilter,
  max_results max_results: option.Option(Int),
  moderation_status moderation_status: option.Option(String),
  order order: option.Option(CommentThreadOrder),
  page_token page_token: option.Option(String),
  search_terms search_terms: option.Option(String),
  text_format text_format: option.Option(String),
) -> Result(
  comment_thread.CommentThreadListResponse,
  error.GleeTubeError,
)

List comment threads matching the given filter.

pub fn list_all(
  client: client.Client,
  parts parts: List(CommentThreadPart),
  filter filter: CommentThreadFilter,
  moderation_status moderation_status: option.Option(String),
  order order: option.Option(CommentThreadOrder),
  search_terms search_terms: option.Option(String),
  text_format text_format: option.Option(String),
) -> Result(
  List(comment_thread.CommentThread),
  error.GleeTubeError,
)

Fetch all comment threads across all pages.

Search Document