Get Version
0.4.5Howcast API Rubygem
What
Howcast Rubygem is a Ruby library for interacting with the Howcast API
Installing
sudo gem install howcast
After installing you will need to get an API Key from: http://www.howcast.com/api_keys/new
Demonstration of usage
require 'rubygems' require 'howcast' hc = Howcast::Client.new(:key => "INSERT API KEY HERE") # Will print out the video titles of the first page of recent howcast studios videos puts "Recent Howcast Studios Videos" hc.videos.each do |v| puts v.title end puts "2nd Page of Top Rated Videos" # Will print out the video titles of the 2nd page of top rated videos hc.videos(:page => 2, :sort => "top_rated", :filter => "all").each do |v| puts v.title end puts "Videos matching 'origami'" hc.search("origami").each do |v| puts v.title end puts "Video with id 946" puts hc.video(946).title # Category API piano = hc.category(1105) puts "The parent category of Piano is #{hc.category(piano.parent_id).name}" ancestors = piano.parents.map{|c| c[:name]} # Ancestors will be an array of hash metadata: # => [{:name=>"Performing Arts", :id=>"1048"}, # {:name=>"Musical Instruments", :id=>"1095"}, # {:name=>"Keyboards", :id=>"1103"}] puts "The ancestors of piano are: #{ancestors.join(" -> ")}"
Forum, Support and Questions
How to check out the code
The git repository is git://github.com/howcast/howcast-gem.git for anonymous access.
License
This code is free to use under the terms of the MIT license.
Contact
Comments are welcome. Send an email to Michael Murray.
Michael Murray, 30th July 2009
Theme extended from Paul Battley