kylejginavan / youtube_it

An object-oriented Ruby wrapper for the YouTube GData API
http://groups.google.com/group/ruby-youtube-library
595 stars 223 forks source link

Following example from the Readme draws Argument Error. #171

Closed andrewloux closed 10 years ago

andrewloux commented 11 years ago

I wrote some basic code to try and get the library working. I am operating on Windows 7, and I just installed the youtube_it gem and attempted to run some example code from the readme, however, I received a puzzling ArgumentError. Here is the code that I tried to run:

#Test YouTube Ruby file. 
require 'youtube_it'
client = YouTubeIt::Client.new(:dev_key => "my developer key here)
client.videos_by(:query => "penguin", :max_results => 1)
client.videos.each do |video|
  video.title
  video.video_id
end

For reference, the error received was this: C:/RailsInstaller/Ruby1.9.3/lib/rubygems/1.9.1/gems/youtube_it-2.3.1/lib/youtube_it/request/video_upload.rb:265: in 'videos' wrong number of arguments (0 for 1) (ArgumentError).

gigacardoso commented 11 years ago

make sure you're using version 2.3.2