Class: Tumblr4r::Photo

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

Instance Attribute Summary collapse

Attributes inherited from Post

#bookmarklet, #date, #date_gmt, #format, #generator, #liked, #post_id, #private, #reblog_key, #tags, #type, #unix_timestamp, #url, #url_with_slug

Instance Method Summary collapse

Methods inherited from Post

#initialize

Constructor Details

This class inherits a constructor from Tumblr4r::Post

Instance Attribute Details

#dataObject

TODO: photo_url の max-width って何?



293
294
295
# File 'lib/tumblr4r.rb', line 293

def data
  @data
end

#photo_captionObject

Returns the value of attribute photo_caption.



291
292
293
# File 'lib/tumblr4r.rb', line 291

def photo_caption
  @photo_caption
end

Returns the value of attribute photo_link_url.



291
292
293
# File 'lib/tumblr4r.rb', line 291

def photo_link_url
  @photo_link_url
end

#photo_urlObject

Returns the value of attribute photo_url.



291
292
293
# File 'lib/tumblr4r.rb', line 291

def photo_url
  @photo_url
end

#photosetObject

Returns the value of attribute photoset.



291
292
293
# File 'lib/tumblr4r.rb', line 291

def photoset
  @photoset
end

Instance Method Details

#paramsObject

TODO: data をどうやってPOSTするか考える 生のデータを持たせるんじゃなく、TumblrPostDataみたいな クラスにラップして、それを各POSTのivarに保持させる?



298
299
300
301
302
303
304
305
# File 'lib/tumblr4r.rb', line 298

def params
  super.merge!(
               {"source" => @photo_url,
                 "caption" => @photo_caption,
                 "click-through-url" => @photo_link_url,
                 "photoset" => @photoset,
                 "data" => @data})
end