Class: Coop::Agenda

Inherits:
APIObject show all
Defined in:
lib/coop/api_object/agenda.rb

Instance Method Summary collapse

Methods inherited from APIObject

parse_response

Instance Method Details

#globalObject

Public: Get the group’s global agenda

Examples

Agenda.new({ group_id: 12345 }).global
# => #<Coop::APIObject>

Returns APIObject with the agenda data



11
12
13
# File 'lib/coop/api_object/agenda.rb', line 11

def global
  Coop.get_parsed("/groups/#{self.group_id}/agenda")
end

#userObject

Public: Get the group’s global agenda

Examples

Agenda.new({ group_id: 12345 }).user
# => #<Coop::APIObject>

Returns APIObject with the agenda data



35
36
37
# File 'lib/coop/api_object/agenda.rb', line 35

def user
  Coop.get_parsed("/groups/#{self.group_id}/my_agenda")
end

#usersObject

Public: Get the group’s agendas for all users

Examples

Agenda.new({ group_id: 12345 }).users
# => [#<Coop::APIObject>, #<Coop::APIObject>, ...]

Returns Array of APIObject with the agenda data



23
24
25
# File 'lib/coop/api_object/agenda.rb', line 23

def users
  Coop.get_parsed("/groups/#{self.group_id}/user_agendas")
end