Wednesday, December 19, 2007

Ruby gem youtube-g version 0.4.0 has been released!

Aims to be in parity with Google's YouTube GData API

Basic queries:

@client = YouTubeG::Client.new
@client.videos_by(:query => "penguin")
@client.videos_by(:tags => ['tiger', 'leopard'])
@client.videos_by(:categories => [:news, :sports])
@client.videos_by(:categories => [:news, :sports], :tags => ['soccer', 'football'])
@client.videos_by(:user => 'liz')

Standard feeds:

@client.videos_by(:most_viewed)
@client.videos_by(:top_rated, :time => :today)

Advanced queries (with boolean operators OR (either), AND (include), NOT (exclude)):

@client.videos_by(:categories => { :either => [:news, :sports], :exclude => [:comedy] }, :tags => { :include => ['football'], :exclude => ['soccer'] })

## INSTALL

* sudo gem install youtube-g

1 comment:

Dallas said...

Thanks for this post. I didn't look at the date, and I think it might be an older post, but I'm finding it useful nonetheless. Looking into this gem and trying to figure out how to use it has been rough. There is very little documentation for it anywhere.