Sha256: b9cedb153429f7304bb5e1b534086d4168f312920cf10f57bb1e115e432439d1

Contents?: true

Size: 432 Bytes

Versions: 2

Compression:

Stored size: 432 Bytes

Contents

module Instapaper
  class Client
    # Defines methods related to users
    module User

      # Gets an OAuth access token for a user.
      def access_token(username, password)
        response = post('oauth/access_token', { :x_auth_username => username, :x_auth_password => password, :x_auth_mode => "client_auth"}, true)
        Hash[*response.body.split("&").map {|part| part.split("=") }.flatten]
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
instapaper-0.2.1 lib/instapaper/client/user.rb
instapaper-0.2.0 lib/instapaper/client/user.rb