Class: Camdram::User
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#name ⇒ Object
Returns the value of attribute name.
Attributes included from API
Attributes inherited from Base
Instance Method Summary collapse
-
#get_orgs ⇒ Array
Return an array of societies the user is authorised for.
-
#get_shows ⇒ Array
Return an array of shows the user is authorised for.
-
#get_venues ⇒ Array
Return an array of venues the user is authorised for.
-
#info ⇒ Hash
Return a hash of the user's attributes.
-
#url_slug ⇒ String
Return the unique Camdram URL slug of the user.
Methods included from API
Methods inherited from Base
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
9 10 11 |
# File 'lib/camdram/user.rb', line 9 def email @email end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/camdram/user.rb', line 9 def name @name end |
Instance Method Details
#get_orgs ⇒ Array
Return an array of societies the user is authorised for
40 41 42 |
# File 'lib/camdram/user.rb', line 40 def get_orgs orgs_share('society') end |
#get_shows ⇒ Array
Return an array of shows the user is authorised for
32 33 34 35 |
# File 'lib/camdram/user.rb', line 32 def get_shows slug = "/auth/account/shows.json" get_array(slug, Show) end |
#get_venues ⇒ Array
Return an array of venues the user is authorised for
47 48 49 |
# File 'lib/camdram/user.rb', line 47 def get_venues orgs_share('venue') end |
#info ⇒ Hash
Return a hash of the user's attributes
14 15 16 17 18 19 20 |
# File 'lib/camdram/user.rb', line 14 def info { id: id, name: name, email: email, } end |
#url_slug ⇒ String
Return the unique Camdram URL slug of the user
25 26 27 |
# File 'lib/camdram/user.rb', line 25 def url_slug "/auth/account.json" end |