Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

howcast-howcast

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

howcast-howcast

  • 0.4.9
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Howcast API Ruby Wrapper

Copyright (c) 2008 Howcast Media Inc.

Author: Jingshen Jimmy Zhang jimmy@howcast.com

Installing

sudo gem install howcast-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 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(" -> ")}"

FAQs

Package last updated on 11 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc