This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Run the following if you haven't already:
gem sources -a http://gems.github.com
Install the gem(s):
sudo gem install howcast-howcast
Michael Murray (author)
Mon Mar 02 23:21:24 -0800 2009
| name | age | message | |
|---|---|---|---|
| |
History.txt | ||
| |
License.txt | ||
| |
Manifest.txt | ||
| |
README.markdown | ||
| |
Rakefile | ||
| |
config/ | ||
| |
doc/ | ||
| |
howcast.gemspec | ||
| |
lib/ | ||
| |
pkg/ | ||
| |
script/ | ||
| |
setup.rb | ||
| |
spec/ | ||
| |
tasks/ | ||
| |
website/ |
Howcast API Ruby Wrapper
Copyright (c) 2008 Howcast Media Inc.
Author: Michael Murray michael@howcast.com
Installing
sudo gem install howcast
Example
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 Recent Featured Videos"
# Will print out the video titles of the 2nd page of recent featured videos
hc.videos(:page => 2, :sort => "most_recent", :filter => "featured").each do |v|
puts v.title
end
puts "Videos matching 'origami'"
hc.video_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(" -> ")}"












