Sha256: 7e55540ae421439fcb331341901c2a689b6fa5edbaa5bf65992926443fa0a0c9

Contents?: true

Size: 482 Bytes

Versions: 1

Compression:

Stored size: 482 Bytes

Contents

module Iremix
  class User
    attr_accessor :id, :first_name, :last_name, :name, :email,
                  :profile_photo, :created_at, :updated_at, :status

    def initialize(attrs = {})
      attrs.each do |k, v| send("#{k}=", v) end
    end

    class << self
      def current(token)
        response = token.get('/api/v1/people/current.json',
                             :params => { :access_token => token.token })

        new(response.parsed)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
iremix-ruby-0.0.5 lib/iremix/user.rb