gleetube/resource/search

Types

Channel type filter for search.

pub type ChannelType {
  ChannelTypeAny
  ChannelTypeShow
}

Constructors

  • ChannelTypeAny
  • ChannelTypeShow

Event type filter for search (live broadcasts).

pub type EventType {
  Completed
  Live
  Upcoming
}

Constructors

  • Completed
  • Live
  • Upcoming

Search result ordering.

pub type Order {
  Date
  Rating
  Relevance
  Title
  VideoCount
  ViewCount
}

Constructors

  • Date
  • Rating
  • Relevance
  • Title
  • VideoCount
  • ViewCount

Safe search setting.

pub type SafeSearch {
  Moderate
  SafeSearchNone
  Strict
}

Constructors

  • Moderate
  • SafeSearchNone
  • Strict

Optional filter for search.list. Search allows zero or one filter.

pub type SearchFilter {
  ForContentOwner
  ForDeveloper
  ForMine
  RelatedToVideoId(video_id: String)
  NoFilter
}

Constructors

  • ForContentOwner
  • ForDeveloper
  • ForMine
  • RelatedToVideoId(video_id: String)
  • NoFilter

Video caption filter.

pub type VideoCaption {
  Any
  ClosedCaption
  CaptionNone
}

Constructors

  • Any
  • ClosedCaption
  • CaptionNone

Video definition filter.

pub type VideoDefinition {
  DefinitionAny
  High
  Standard
}

Constructors

  • DefinitionAny
  • High
  • Standard

Video dimension filter.

pub type VideoDimension {
  DimensionAny
  TwoD
  ThreeD
}

Constructors

  • DimensionAny
  • TwoD
  • ThreeD

Video duration filter.

pub type VideoDuration {
  DurationAny
  Long
  Medium
  Short
}

Constructors

  • DurationAny
  • Long
  • Medium
  • Short

Video embeddable filter.

pub type VideoEmbeddable {
  EmbeddableAny
  EmbeddableTrue
}

Constructors

  • EmbeddableAny
  • EmbeddableTrue

Video license filter.

pub type VideoLicense {
  CreativeCommon
  YouTube
}

Constructors

  • CreativeCommon
  • YouTube

Video syndicated filter.

pub type VideoSyndicated {
  SyndicatedAny
  SyndicatedTrue
}

Constructors

  • SyndicatedAny
  • SyndicatedTrue

Video type filter.

pub type VideoType {
  TypeAny
  Episode
  Movie
}

Constructors

  • TypeAny
  • Episode
  • Movie

Values

pub fn list(
  client: client.Client,
  filter filter: SearchFilter,
  q q: option.Option(String),
  channel_id channel_id: option.Option(String),
  channel_type channel_type: option.Option(ChannelType),
  event_type event_type: option.Option(EventType),
  location location: option.Option(String),
  location_radius location_radius: option.Option(String),
  max_results max_results: option.Option(Int),
  on_behalf_of_content_owner on_behalf_of_content_owner: option.Option(
    String,
  ),
  order order: option.Option(Order),
  page_token page_token: option.Option(String),
  published_after published_after: option.Option(String),
  published_before published_before: option.Option(String),
  region_code region_code: option.Option(String),
  relevance_language relevance_language: option.Option(String),
  safe_search safe_search: option.Option(SafeSearch),
  topic_id topic_id: option.Option(String),
  type_ type_: option.Option(String),
  video_caption video_caption: option.Option(VideoCaption),
  video_category_id video_category_id: option.Option(String),
  video_definition video_definition: option.Option(
    VideoDefinition,
  ),
  video_dimension video_dimension: option.Option(VideoDimension),
  video_duration video_duration: option.Option(VideoDuration),
  video_embeddable video_embeddable: option.Option(
    VideoEmbeddable,
  ),
  video_license video_license: option.Option(VideoLicense),
  video_paid_product_placement video_paid_product_placement: option.Option(
    Bool,
  ),
  video_syndicated video_syndicated: option.Option(
    VideoSyndicated,
  ),
  video_type video_type: option.Option(VideoType),
) -> Result(search_result.SearchListResponse, error.GleeTubeError)

List search results.

pub fn list_all(
  client: client.Client,
  filter filter: SearchFilter,
  q q: option.Option(String),
  channel_id channel_id: option.Option(String),
  channel_type channel_type: option.Option(ChannelType),
  event_type event_type: option.Option(EventType),
  location location: option.Option(String),
  location_radius location_radius: option.Option(String),
  on_behalf_of_content_owner on_behalf_of_content_owner: option.Option(
    String,
  ),
  order order: option.Option(Order),
  published_after published_after: option.Option(String),
  published_before published_before: option.Option(String),
  region_code region_code: option.Option(String),
  relevance_language relevance_language: option.Option(String),
  safe_search safe_search: option.Option(SafeSearch),
  topic_id topic_id: option.Option(String),
  type_ type_: option.Option(String),
  video_caption video_caption: option.Option(VideoCaption),
  video_category_id video_category_id: option.Option(String),
  video_definition video_definition: option.Option(
    VideoDefinition,
  ),
  video_dimension video_dimension: option.Option(VideoDimension),
  video_duration video_duration: option.Option(VideoDuration),
  video_embeddable video_embeddable: option.Option(
    VideoEmbeddable,
  ),
  video_license video_license: option.Option(VideoLicense),
  video_paid_product_placement video_paid_product_placement: option.Option(
    Bool,
  ),
  video_syndicated video_syndicated: option.Option(
    VideoSyndicated,
  ),
  video_type video_type: option.Option(VideoType),
) -> Result(List(search_result.SearchResult), error.GleeTubeError)

Fetch all search results across all pages.

Search Document