Module: TheCity::API::Groups
Instance Method Summary collapse
-
#group(*args) ⇒ TheCity::Group
Returns a group by id.
-
#my_groups(options = {}) ⇒ Array<TheCity::Group>
Returns all the groups that the current user has an active role in.
Instance Method Details
#group(id) ⇒ TheCity::Group #group(id, options = {}) ⇒ TheCity::Group
Returns a group by id
31 32 33 34 35 36 37 |
# File 'lib/the_city/api/groups.rb', line 31 def group(*args) @groups ||= {} arguments = TheCity::Arguments.new(args) gid = args.shift @groups[tid] = nil if arguments..delete(:force_download) @groups[tid] ||= object_from_response(TheCity::Group, :get, "/groups/#{gid}", arguments.) end |
#my_groups(options = {}) ⇒ Array<TheCity::Group>
Returns all the groups that the current user has an active role in
15 16 17 18 |
# File 'lib/the_city/api/groups.rb', line 15 def my_groups(={}) @my_groups = nil if .delete(:force_download) @my_groups ||= objects_from_response(TheCity::Group, :get, "/me/groups", ) end |