Class: Highrise::User

Inherits:
Base
  • Object
show all
Defined in:
lib/highrise/user.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.meObject

Permits API-key retrieval using name and password.

Highrise::User.site = "https://yourcompany.highrise.com"
Highrise::User.user = "your_user_name"
Highrise::User.password = "s3kr3t"
Highrise::User.me.token # contains the API token for "your_user_name"


12
13
14
15
# File 'lib/highrise/user.rb', line 12

def self.me
  user = User.new()
  find(:one, :from => "/me.xml")
end

Instance Method Details

#join(group) ⇒ Object



3
4
5
# File 'lib/highrise/user.rb', line 3

def join(group)
  Membership.create(:user_id => id, :group_id => group.id)
end