Sha256: a824ee9aad35060751e5b40b85af6f19f4dcc66101468a4626cc4bdd4bd34d1a
Contents?: true
Size: 1.27 KB
Versions: 1
Compression:
Stored size: 1.27 KB
Contents
class Muri module Filter module Picasa private PICASA_PHOTO = 'photo' def self.included(base) base.class_eval do self::PARSERS[Muri::Filter::Picasa] = "picasa_parse" end end def self.parsable?(uri) uri.host =~ /^(www\.)?picasaweb\.google\.com$/i end def picasa_parse self.media_service = PICASA_SERVICE_NAME url_common = "http://picasaweb.google.com" reencoded_url = URI.parse(URI.encode self.uri.to_s) if reencoded_url.path =~ /^\/(.[^\/]+)\/(.+)/i username = $1 album_photoid = $2.split("%23") photoid = album_photoid.last album = album_photoid[0..-2].join("#")#in case other hash symbols exist self.media_id = photoid self.media_website = "#{url_common}/#{username}/#{album}##{photoid}" self.media_api_type = PICASA_PHOTO self.media_api_id = "#{username}/album/#{album}/photoid/#{photoid}" else raise UnsupportedURI end end end end end # http://picasaweb.google.com/bananastalktome/TestForAPI#5450524726782297346 # API Call: http://picasaweb.google.com/data/feed/api/user/bananastalktome/album/TestForAPI/photoid/5450524726782297346 # #=%23
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
muri-1.1.0 | lib/muri/filters/picasa.rb |