github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

mattetti / gvideo

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 1
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (1)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (1)
    • 0.1.0
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

retrieve a google user's list of videos using his user id. — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

updated the rakefile to change local build version to 0.1.0 
mattetti (author)
Sun Sep 28 15:52:13 -0700 2008
commit  b6aa1d61890925c570b348a120c91a510aaa74cf
tree    fcf436f2b25a97ac2c47a9c70ad06f1ecfeb1eb7
parent  e2e2f89557c825709fe5ac96316452dbd6b9bd2c
gvideo /
name age
history
message
file LICENSE Fri Sep 19 13:24:43 -0700 2008 added copyright and other minor stuff [mattetti]
file README Sun Sep 28 15:39:11 -0700 2008 added Gvideo::User.new("A005148908335059515423"... [mattetti]
file Rakefile Sun Sep 28 15:52:13 -0700 2008 updated the rakefile to change local build vers... [mattetti]
file TODO Fri Sep 19 13:24:43 -0700 2008 added copyright and other minor stuff [mattetti]
file gvideo.gemspec Sun Sep 28 15:40:21 -0700 2008 updated to gemspec to 0.1.0 [mattetti]
directory lib/ Sun Sep 28 15:39:11 -0700 2008 added Gvideo::User.new("A005148908335059515423"... [mattetti]
directory script/ Fri Sep 19 13:23:11 -0700 2008 initial import [mattetti]
directory spec/ Sun Sep 28 15:39:11 -0700 2008 added Gvideo::User.new("A005148908335059515423"... [mattetti]
README
gvideo
======

A gem that provides access to a google users' videos

$ gem sources -a http://gems.github.com (you only have to do this once)
$ sudo gem install mattetti-gvideo

Usage:
    
    begin 
      require 'minigems'
    rescue LoadError 
      require 'rubygems'
    end
    require 'gvideo'
    user = Gvideo::User.new("A005148908335059515423")
    videos = user.fetch_videos
    videos.first.embed_player
    
or use conditions

   user.fetch_videos(:title => "Durex: The Garden").first
   videos = user.fetch_videos(:title => /Durex/)
   videos = user.fetch_videos(:duration => 120)
   videos = user.fetch_videos(:duration => 60..360)
    
or finally just retrieve a video by using the docid
  
    user.fetch_video("6977350643295106940")

Video methods and attributes:
---

* docid (google video id)
* title (title of the video)
* video_url (google video url to watch the video)
* duration (duration of the video in seconds)
* duration_in_minutes (duration video in minutes)
* thumbnail_url (url of the thumbnail representing the video)
* embed_player (html snippet with the google video player)

Check lib/gvideo.rb for more 

You can find a user's id by using firebug and inspect the call made to "see more videos from a user"
You can also click on one of the videos available from the "see more videos from a user" and click on one of the videos. 
The url will contain the user id.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server