lib/you_tube/resources/playlists.rb
# Updates a Playlist. ID and Title are required.
# https://developers.google.com/youtube/v3/docs/playlists/update
Updates a Playlist. ID and Title are required.
Updates a Playlist . ID and Title are required .
def update(id:, title:, **attributes)
      attrs = {}
      attrs[:id] = id
      attrs[:snippet] = {}
      attrs[:status] = {}
      attrs[:snippet][:title] = title
      attrs[:snippet][:description]     = attributes[:description]
      attrs[:snippet][:defaultLanguage] = attributes[:default_language]
      attrs[:status][:privacyStatus]    = attributes[:privacy_status]
      response = put_request("playlists?part=id,snippet,status", body: attrs)
      Playlist.new(response.body) if response.success?
    end
def update ( id : , title : , ** attributes ) attrs = { } attrs [ :id ] = id attrs [ :snippet ] = { } attrs [ :status ] = { } attrs [ :snippet ] [ :title ] = title attrs [ :snippet ] [ :description ] = attributes [ :description ] attrs [ :snippet ] [ :defaultLanguage ] = attributes [ :default_language ] attrs [ :status ] [ :privacyStatus ] = attributes [ :privacy_status ] response = put_request ( "playlists?part=id,snippet,status" , body : attrs ) Playlist . new ( response . body ) if response . success? end
Updates a Playlist.
Updates a Playlist .
id
<not_specific>
title
<not_specific>
attributes
<not_specific>