Class: Chiketto::User
Instance Attribute Summary collapse
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from Resource
Class Method Summary collapse
Instance Method Summary collapse
- #email ⇒ Object
- #emails ⇒ Object
- #event_attendees(params = {}) ⇒ Object
- #events(params = {}) ⇒ Object
- #organizers ⇒ Object
Methods inherited from Resource
build_query_string, endpoint, get, #initialize, open_post, paginated, post, should_paginate, token
Methods included from AttrDSL
Constructor Details
This class inherits a constructor from Chiketto::Resource
Instance Attribute Details
#first_name ⇒ Object
Returns the value of attribute first_name.
3 4 5 |
# File 'lib/chiketto/user.rb', line 3 def first_name @first_name end |
#last_name ⇒ Object
Returns the value of attribute last_name.
3 4 5 |
# File 'lib/chiketto/user.rb', line 3 def last_name @last_name end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/chiketto/user.rb', line 3 def name @name end |
Class Method Details
Instance Method Details
#email ⇒ Object
12 13 14 |
# File 'lib/chiketto/user.rb', line 12 def email emails.detect { |email| email.primary } end |
#emails ⇒ Object
16 17 18 |
# File 'lib/chiketto/user.rb', line 16 def emails @emails.map { |email| Email.new email } end |
#event_attendees(params = {}) ⇒ Object
25 26 27 28 |
# File 'lib/chiketto/user.rb', line 25 def event_attendees(params = {}) attendees = User.paginated_attendees @id, params attendees.map { |e| Attendee.new e } end |