Module: Camper::Client::People

Included in:
Camper::Client
Defined in:
lib/camper/client/people.rb

Instance Method Summary (collapse)

Instance Method Details

- (Camper::Person, false) me

Get the authenticated user's data

Returns:

  • (Camper::Person, false)

    returns a Camper::Person object if request is successful, otherwise returns false



27
28
29
# File 'lib/camper/client/people.rb', line 27

def me
  handle Camper::Person, get("people/me")
end

- (Array, false) people

Get all the people on a Basecamp account

Returns:

  • (Array, false)

    if successful, returns an Array of Camper::Person objects. Otherwise, returns false.



9
10
11
# File 'lib/camper/client/people.rb', line 9

def people
  handle Camper::Person, get("people")
end

- (Camper::Person, false) person(id)

Get a single person's data

Parameters:

  • id (Fixnum, String)

    the ID of the user wanted

Returns:

  • (Camper::Person, false)

    returns a Camper::Person object if request is successful, otherwise returns false



19
20
21
# File 'lib/camper/client/people.rb', line 19

def person(id)
  handle Camper::Person, get("people/#{id}")
end