Sha256: 70bf047bd1547dd591e0a8038a18079defc21747ca1b5eba6229ca933d7ce385

Contents?: true

Size: 522 Bytes

Versions: 25

Compression:

Stored size: 522 Bytes

Contents

module Highrise
  class User < Base
    def join(group)
      Membership.create(:user_id => id, :group_id => group.id)
    end

    # 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"  
    def self.me
      user = User.new()
      find(:one, :from => "/me.xml")
    end
  end
end

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
highrise-3.2.3 lib/highrise/user.rb
highrise-3.2.1 lib/highrise/user.rb
highrise-3.1.6 lib/highrise/user.rb
highrise-3.1.5 lib/highrise/user.rb
highrise-3.1.2 lib/highrise/user.rb
highrise-3.1.1 lib/highrise/user.rb
highrise-3.1.0 lib/highrise/user.rb
highrise-3.1.0.pre lib/highrise/user.rb
highrise-3.0.5 lib/highrise/user.rb
highrise-3.0.4 lib/highrise/user.rb
highrise-3.0.3 lib/highrise/user.rb
peterosullivan-highrise-3.0.7 lib/highrise/user.rb
peterosullivan-highrise-3.0.6 lib/highrise/user.rb
peterosullivan-highrise-3.0.5 lib/highrise/user.rb
peterosullivan-highrise-3.0.4 lib/highrise/user.rb
peterosullivan-highrise-3.0.3 lib/highrise/user.rb
peterosullivan-highrise-3.0.2 lib/highrise/user.rb
highrise-3.0.1 lib/highrise/user.rb
highrise-3.0.0 lib/highrise/user.rb
rogerio-augusto-highrise-2.0.4 lib/highrise/user.rb