Method: Yt::Models::Playlist#update

Defined in:
lib/yt/models/playlist.rb

#update(attributes = {}) ⇒ Boolean

Updates the attributes of a playlist.

Examples:

Update title and description of a playlist.

playlist.update title: 'New title', description: 'New description'

Update tags and status of a playlist.

playlist.update tags: ['new', 'tags'], privacy_status: 'public'

Parameters:

  • attributes (Hash) (defaults to: {})

    the attributes to update.

Options Hash (attributes):

  • :title (String)

    The new playlist’s title. Cannot have more than 100 characters. Can include the characters < and >, which are replaced to ‹ › in order to be accepted by YouTube.

  • :description (String)

    The new playlist’s description. Cannot have more than 5000 bytes. Can include the characters < and >, which are replaced to ‹ › in order to be accepted by YouTube.

  • :tags (Array<String>)

    The new playlist’s tags. Cannot have more than 500 characters. Can include the characters < and >, which are replaced to ‹ › in order to be accepted by YouTube.

  • :privacy_status (String)

    The new playlist’s privacy status. Must be one of: private, unscheduled, public.

Returns:

  • (Boolean)

    whether the playlist was successfully updated.

Raises:



79
80
81
# File 'lib/yt/models/playlist.rb', line 79

def update(attributes = {})
  super
end