Class: Youtube::YT

Inherits:
Object
  • Object
show all
Defined in:
lib/downthetube/youtube.rb

Overview

:nodoc: all

Instance Method Summary collapse

Instance Method Details

#feed_for(user) ⇒ Object



31
32
33
34
35
36
37
38
39
# File 'lib/downthetube/youtube.rb', line 31

def feed_for user
  client = get_client
  begin
    response = client.get("http://gdata.youtube.com/feeds/api/users/#{user}/playlists?v=2")
    response.to_xml
  rescue Exception => e
    raise Youtube::RetrievalError.new(e.message)
  end
end

#get_clientObject



41
42
43
# File 'lib/downthetube/youtube.rb', line 41

def get_client 
  client = GData::Client::YouTube.new
end