Class: TwitPhoto::Adaptors::LockerzAdaptor

Inherits:
Object
  • Object
show all
Defined in:
lib/adaptors.rb

Class Method Summary collapse

Class Method Details

.domainsObject

TweetPhoto was a good name, why they changed twice I don’t understand



26
27
28
# File 'lib/adaptors.rb', line 26

def self.domains
  %w(http://tweetphoto.com http://plixi.com http://lockerz.com)
end

.getImageUrl(url) ⇒ Object



30
31
32
33
34
35
# File 'lib/adaptors.rb', line 30

def self.getImageUrl url
  domain = self.domains.select { |d| url.to_s.start_with?(d) }
  return nil if domain.empty?

  return "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=large&url=" + url
end