class Instapaper::Client
Wrapper for the Instapaper
REST API
Attributes
consumer_key[RW]
consumer_secret[RW]
oauth_token[RW]
oauth_token_secret[RW]
proxy[RW]
user_agent[W]
Public Class Methods
new(options = {}) { |self| ... }
click to toggle source
Initializes a new Client
object
@param options [Hash] @return [Instapaper::Client]
# File lib/instapaper/client.rb, line 18 def initialize(options = {}) options.each do |key, value| instance_variable_set("@#{key}", value) end yield(self) if block_given? end
Public Instance Methods
consumer_credentials()
click to toggle source
@return [Hash]
# File lib/instapaper/client.rb, line 43 def consumer_credentials { consumer_key: @consumer_key, consumer_secret: @consumer_secret, } end
credentials()
click to toggle source
Authentication hash
@return [Hash]
# File lib/instapaper/client.rb, line 33 def credentials { consumer_key: @consumer_key, consumer_secret: @consumer_secret, oauth_token: @oauth_token, oauth_token_secret: @oauth_token_secret, } end
credentials?()
click to toggle source
@return [Boolean]
# File lib/instapaper/client.rb, line 51 def credentials? credentials.values.all? end
user_agent()
click to toggle source
@return [String]
# File lib/instapaper/client.rb, line 26 def user_agent @user_agent ||= "InstapaperRubyGem/#{Instapaper::VERSION}" end