Sha256: e2556d481327abb7352d1575458f24d69b7b2501b61ccae1fe48f56a1695796b
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 KB
Contents
class TumblrWrapper::Client attr_reader :access_token, :request_token def authorize_url @request_token = consumer.get_request_token @request_token.authorize_url end def request_access_token(oauth_verifier) token = request_token.get_access_token({:oauth_verifier => oauth_verifier}) @access_token = { consumer_key: TumblrWrapper.consumer_key, consumer_secret: TumblrWrapper.consumer_secret, oauth_token: token.token, oauth_token_secret: token.secret } end def build_request_token(token, secret) @request_token = OAuth::RequestToken.new(consumer, token, secret) end def build_access_token(token, secret) @access_token = { consumer_key: TumblrWrapper.consumer_key, consumer_secret: TumblrWrapper.consumer_secret, oauth_token: token, oauth_token_secret: secret } end def consumer @consumer ||= OAuth::Consumer.new( TumblrWrapper.consumer_key, TumblrWrapper.consumer_secret, site: 'http://www.tumblr.com' ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tumblr_wrapper-0.3.1 | lib/tumblr_wrapper/client.rb |