Created
June 18, 2011 15:53
-
-
Save dbackeus/1033209 to your computer and use it in GitHub Desktop.
Streamio RubyGem Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "streamio" | |
| # Configure it | |
| Streamio.configure do |config| | |
| config.username = "your_account_name" | |
| config.password = "your_api_private_key" | |
| end | |
| # Create a Video | |
| video = Streamio::Video.create :file => File.new("path/to/an/awesome.movie") | |
| # Update the Video | |
| video.title = "Awesome!" | |
| video.tags = ["Awesome", "HD"] | |
| video.save | |
| # Find your videos | |
| videos = Streamio::Video.all | |
| # Query your videos | |
| videos = Streamio::Video.all(:tags => ["HD"], :limit => 5, :order => "plays.desc") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment