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 (
commit cb691262b8b2fc65c4cc5f0c212b701bd22499ce
tree dd737c90c3bfdd6beeac9f4a789b3837f4275e08
parent d657711765f4b6d622931c9b1c1cbd17838f1ed7
tree dd737c90c3bfdd6beeac9f4a789b3837f4275e08
parent d657711765f4b6d622931c9b1c1cbd17838f1ed7
| name | age | message | |
|---|---|---|---|
| |
History.txt | ||
| |
License.txt | Tue Jun 17 13:15:32 -0700 2008 | |
| |
Manifest.txt | ||
| |
README.markdown | ||
| |
Rakefile | ||
| |
config/ | ||
| |
doc/ | ||
| |
howcast.gemspec | ||
| |
lib/ | ||
| |
pkg/ | ||
| |
script/ | ||
| |
setup.rb | ||
| |
spec/ | ||
| |
tasks/ | Tue Jun 17 13:15:32 -0700 2008 | |
| |
website/ |
README.markdown
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(" -> ")}"








