Class: Basecamp3::Person

Inherits:
Model
  • Object
show all
Defined in:
lib/basecamp3/models/person.rb

Overview

Constant Summary

Constants inherited from Model

Model::REQUIRED_FIELDS

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Model

#initialize

Constructor Details

This class inherits a constructor from Basecamp3::Model

Instance Attribute Details

#adminObject

Returns the value of attribute admin



5
6
7
# File 'lib/basecamp3/models/person.rb', line 5

def admin
  @admin
end

#avatar_urlObject

Returns the value of attribute avatar_url



5
6
7
# File 'lib/basecamp3/models/person.rb', line 5

def avatar_url
  @avatar_url
end

#bioObject

Returns the value of attribute bio



5
6
7
# File 'lib/basecamp3/models/person.rb', line 5

def bio
  @bio
end

#created_atObject

Returns the value of attribute created_at



5
6
7
# File 'lib/basecamp3/models/person.rb', line 5

def created_at
  @created_at
end

#email_addressObject

Returns the value of attribute email_address



5
6
7
# File 'lib/basecamp3/models/person.rb', line 5

def email_address
  @email_address
end

#idObject

Returns the value of attribute id



5
6
7
# File 'lib/basecamp3/models/person.rb', line 5

def id
  @id
end

#nameObject

Returns the value of attribute name



5
6
7
# File 'lib/basecamp3/models/person.rb', line 5

def name
  @name
end

#ownerObject

Returns the value of attribute owner



5
6
7
# File 'lib/basecamp3/models/person.rb', line 5

def owner
  @owner
end

#time_zoneObject

Returns the value of attribute time_zone



5
6
7
# File 'lib/basecamp3/models/person.rb', line 5

def time_zone
  @time_zone
end

#titleObject

Returns the value of attribute title



5
6
7
# File 'lib/basecamp3/models/person.rb', line 5

def title
  @title
end

#updated_atObject

Returns the value of attribute updated_at



5
6
7
# File 'lib/basecamp3/models/person.rb', line 5

def updated_at
  @updated_at
end

Class Method Details

.allArray<Basecamp3::Person>

Returns a list of all people visible to the current user.

Returns:



20
21
22
# File 'lib/basecamp3/models/person.rb', line 20

def self.all
  Basecamp3.request.get("/people", {}, Basecamp3::Person)
end

.find(id) ⇒ Basecamp3::Person

Returns the person.

Parameters:

  • id (Integer)

    the id of the person

Returns:



36
37
38
# File 'lib/basecamp3/models/person.rb', line 36

def self.find(id)
  Basecamp3.request.get("/people/#{id}", {}, Basecamp3::Person)
end

.meBasecamp3::Person

Returns the current user's personal info..

Returns:



43
44
45
# File 'lib/basecamp3/models/person.rb', line 43

def self.me
  Basecamp3.request.get("/my/profile", {}, Basecamp3::Person)
end

.pingableArray<Basecamp3::Person>

Returns a list of all people who can be pinged.

Returns:



27
28
29
# File 'lib/basecamp3/models/person.rb', line 27

def self.pingable
  Basecamp3.request.get("/circles/people", {}, Basecamp3::Person)
end