Class: Google::Apis::YoutubeV3::VideoSnippet

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/youtube_v3/classes.rb,
generated/google/apis/youtube_v3/representations.rb,
generated/google/apis/youtube_v3/representations.rb

Overview

Basic details about a video, including title, description, uploader, thumbnails and category.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ VideoSnippet

Returns a new instance of VideoSnippet



8255
8256
8257
# File 'generated/google/apis/youtube_v3/classes.rb', line 8255

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#category_idString

The YouTube video category associated with the video. Corresponds to the JSON property categoryId

Returns:

  • (String)


8194
8195
8196
# File 'generated/google/apis/youtube_v3/classes.rb', line 8194

def category_id
  @category_id
end

#channel_idString

The ID that YouTube uses to uniquely identify the channel that the video was uploaded to. Corresponds to the JSON property channelId

Returns:

  • (String)


8200
8201
8202
# File 'generated/google/apis/youtube_v3/classes.rb', line 8200

def channel_id
  @channel_id
end

#channel_titleString

Channel title for the channel that the video belongs to. Corresponds to the JSON property channelTitle

Returns:

  • (String)


8205
8206
8207
# File 'generated/google/apis/youtube_v3/classes.rb', line 8205

def channel_title
  @channel_title
end

#default_audio_languageString

The default_audio_language property specifies the language spoken in the video' s default audio track. Corresponds to the JSON property defaultAudioLanguage

Returns:

  • (String)


8211
8212
8213
# File 'generated/google/apis/youtube_v3/classes.rb', line 8211

def default_audio_language
  @default_audio_language
end

#default_languageString

The language of the videos's default snippet. Corresponds to the JSON property defaultLanguage

Returns:

  • (String)


8216
8217
8218
# File 'generated/google/apis/youtube_v3/classes.rb', line 8216

def default_language
  @default_language
end

#descriptionString

The video's description. Corresponds to the JSON property description

Returns:

  • (String)


8221
8222
8223
# File 'generated/google/apis/youtube_v3/classes.rb', line 8221

def description
  @description
end

#live_broadcast_contentString

Indicates if the video is an upcoming/active live broadcast. Or it's "none" if the video is not an upcoming/active live broadcast. Corresponds to the JSON property liveBroadcastContent

Returns:

  • (String)


8227
8228
8229
# File 'generated/google/apis/youtube_v3/classes.rb', line 8227

def live_broadcast_content
  @live_broadcast_content
end

#localizedGoogle::Apis::YoutubeV3::VideoLocalization

Localized versions of certain video properties (e.g. title). Corresponds to the JSON property localized



8232
8233
8234
# File 'generated/google/apis/youtube_v3/classes.rb', line 8232

def localized
  @localized
end

#published_atDateTime

The date and time that the video was uploaded. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. Corresponds to the JSON property publishedAt

Returns:

  • (DateTime)


8238
8239
8240
# File 'generated/google/apis/youtube_v3/classes.rb', line 8238

def published_at
  @published_at
end

#tagsArray<String>

A list of keyword tags associated with the video. Tags may contain spaces. Corresponds to the JSON property tags

Returns:

  • (Array<String>)


8243
8244
8245
# File 'generated/google/apis/youtube_v3/classes.rb', line 8243

def tags
  @tags
end

#thumbnailsGoogle::Apis::YoutubeV3::ThumbnailDetails

Internal representation of thumbnails for a YouTube resource. Corresponds to the JSON property thumbnails



8248
8249
8250
# File 'generated/google/apis/youtube_v3/classes.rb', line 8248

def thumbnails
  @thumbnails
end

#titleString

The video's title. Corresponds to the JSON property title

Returns:

  • (String)


8253
8254
8255
# File 'generated/google/apis/youtube_v3/classes.rb', line 8253

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
# File 'generated/google/apis/youtube_v3/classes.rb', line 8260

def update!(**args)
  @category_id = args[:category_id] if args.key?(:category_id)
  @channel_id = args[:channel_id] if args.key?(:channel_id)
  @channel_title = args[:channel_title] if args.key?(:channel_title)
  @default_audio_language = args[:default_audio_language] if args.key?(:default_audio_language)
  @default_language = args[:default_language] if args.key?(:default_language)
  @description = args[:description] if args.key?(:description)
  @live_broadcast_content = args[:live_broadcast_content] if args.key?(:live_broadcast_content)
  @localized = args[:localized] if args.key?(:localized)
  @published_at = args[:published_at] if args.key?(:published_at)
  @tags = args[:tags] if args.key?(:tags)
  @thumbnails = args[:thumbnails] if args.key?(:thumbnails)
  @title = args[:title] if args.key?(:title)
end