Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattetti/gvideo
retrieve a google user's list of videos using his user id.
https://github.com/mattetti/gvideo
Last synced: about 11 hours ago
JSON representation
retrieve a google user's list of videos using his user id.
- Host: GitHub
- URL: https://github.com/mattetti/gvideo
- Owner: mattetti
- License: mit
- Created: 2008-09-25T23:03:20.000Z (over 16 years ago)
- Default Branch: master
- Last Pushed: 2008-09-28T22:53:02.000Z (over 16 years ago)
- Last Synced: 2024-11-27T13:12:37.539Z (2 months ago)
- Language: Ruby
- Homepage:
- Size: 85.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
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-gvideoUsage:
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 conditionsuser.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.