class TumblrClientWrapper::Posts::ApiRequest
Public Class Methods
new()
click to toggle source
# File lib/tumblr_client_wrapper/posts.rb, line 9 def initialize @@tumblr_client = Tumblr::Client.new(client: :httpclient) end
Public Instance Methods
get_posts(tumblr_id, options)
click to toggle source
# File lib/tumblr_client_wrapper/posts.rb, line 13 def get_posts(tumblr_id, options) unless options.empty? response = @@tumblr_client.posts("#{tumblr_id}.tumblr.com") else response = @@tumblr_client.posts("#{tumblr_id}.tumblr.com", options) end end
paginate(tumbld_id, offset)
click to toggle source
# File lib/tumblr_client_wrapper/posts.rb, line 21 def paginate(tumbld_id, offset) response = @@tumblr_client.posts("#{tumblr_id}.tumblr.com", offset: offset) end