Sha256: 1cfa75863ba35f70dcf4f1fd4a7d34b0bfed31ee4db0f95d90bd5879053bb77e

Contents?: true

Size: 500 Bytes

Versions: 2

Compression:

Stored size: 500 Bytes

Contents

class Tumblr
  class Authenticator < Weary::Base
    
    headers({"User-Agent" => Tumblr::USER_AGENT})
    
    def initialize(*credentials)
      @defaults = {:email => credentials[0], :password => credentials[1]} unless credentials.blank?
    end
    
    # http://www.tumblr.com/docs/en/api#authenticate
    post :authenticate do |auth|
      auth.url = 'http://www.tumblr.com/api/authenticate'
      auth.requires = [:email, :password]
      auth.with = [:'include-theme']
    end
    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tumblr-rb-1.3.0 lib/tumblr/authenticator.rb
tumblr-rb-1.2.0 lib/tumblr/authenticator.rb