Sha256: 856f2ed2c8d8fb6a5485cf49816a69b4ea31af1148cb8e9f590541664613bca1

Contents?: true

Size: 440 Bytes

Versions: 1

Compression:

Stored size: 440 Bytes

Contents

require 'httparty'

module Oauthio
  class Client
    attr_accessor :provider, :access_token

    def initialize provider, access_token
      @provider = provider
      @access_token = access_token
    end

    def me
      HTTParty.get "#{Oauthio.endpoint_url}/#{@provider}/me", headers: {
        'oauthio' => "k=#{Oauthio.public_key}&access_token=#{@access_token}",
        'Content-Type' => 'application/json'
      }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
oauthio-0.9.0 lib/oauthio/client.rb