Class: TwitPhoto::Adaptors::InstagramAdaptor
- Inherits:
-
Object
- Object
- TwitPhoto::Adaptors::InstagramAdaptor
- Defined in:
- lib/adaptors.rb
Class Method Summary collapse
Class Method Details
.getImageUrl(url) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/adaptors.rb', line 6 def self.getImageUrl url if url.index("http://instagr.am") != 0 return nil end # ensure last char is '/' if url[url.length - 1] != "/"[0] url = url + "/" end return url + "media/?size=m" end |