Module: Teamlab::ProjectsDiscussions
- Included in:
- Project
- Defined in:
- lib/teamlab/modules/projects/projects_discussions.rb
Overview
Module for projects discussions methods
Instance Method Summary collapse
- #add_message(project_id, title, content, participants, options = {}) ⇒ Object
- #check_subscription_to_discussion(message_id) ⇒ Object
- #delete_message(message_id) ⇒ Object
-
#discussion_subscribers(message_id) ⇒ Array
Returns a list of all the subscribers of the discussion with the selected message.
- #get_latest_discussion_messages ⇒ Object
- #get_message_by_filter(options = {}) ⇒ Object
- #get_messages(project_id) ⇒ Object
- #get_project_message(message_id) ⇒ Object
-
#preview_of_discussion_message(htmltext) ⇒ Hash
Returns a preview of the discussion message.
- #subscribe_to_message_action(message_id) ⇒ Object
- #update_message(message_id, project_id, title, content, options = {}) ⇒ Object
- #update_message_status(message_id, status) ⇒ Object
Instance Method Details
#add_message(project_id, title, content, participants, options = {}) ⇒ Object
26 27 28 |
# File 'lib/teamlab/modules/projects/projects_discussions.rb', line 26 def (project_id, title, content, participants, = {}) @request.post([project_id.to_s, 'message'], { title: title, content: content, participants: participants }.merge()) end |
#check_subscription_to_discussion(message_id) ⇒ Object
22 23 24 |
# File 'lib/teamlab/modules/projects/projects_discussions.rb', line 22 def check_subscription_to_discussion() @request.get(['message', .to_s, 'subscribe']) end |
#delete_message(message_id) ⇒ Object
49 50 51 |
# File 'lib/teamlab/modules/projects/projects_discussions.rb', line 49 def () @request.delete(['message', .to_s]) end |
#discussion_subscribers(message_id) ⇒ Array
Returns a list of all the subscribers of the discussion with the selected message
45 46 47 |
# File 'lib/teamlab/modules/projects/projects_discussions.rb', line 45 def discussion_subscribers() @request.get(['message', .to_s, 'subscribes']) end |
#get_latest_discussion_messages ⇒ Object
6 7 8 |
# File 'lib/teamlab/modules/projects/projects_discussions.rb', line 6 def @request.get(['message']) end |
#get_message_by_filter(options = {}) ⇒ Object
10 11 12 |
# File 'lib/teamlab/modules/projects/projects_discussions.rb', line 10 def ( = {}) @request.get(%w[message filter], ) end |
#get_messages(project_id) ⇒ Object
14 15 16 |
# File 'lib/teamlab/modules/projects/projects_discussions.rb', line 14 def (project_id) @request.get([project_id.to_s, 'message']) end |
#get_project_message(message_id) ⇒ Object
18 19 20 |
# File 'lib/teamlab/modules/projects/projects_discussions.rb', line 18 def () @request.get(['message', .to_s]) end |
#preview_of_discussion_message(htmltext) ⇒ Hash
Returns a preview of the discussion message
56 57 58 |
# File 'lib/teamlab/modules/projects/projects_discussions.rb', line 56 def (htmltext) @request.post(%w[message discussion preview], htmltext: htmltext) end |
#subscribe_to_message_action(message_id) ⇒ Object
38 39 40 |
# File 'lib/teamlab/modules/projects/projects_discussions.rb', line 38 def () @request.put(['message', .to_s, 'subscribe']) end |
#update_message(message_id, project_id, title, content, options = {}) ⇒ Object
30 31 32 |
# File 'lib/teamlab/modules/projects/projects_discussions.rb', line 30 def (, project_id, title, content, = {}) @request.put(['message', .to_s], { projectid: project_id, title: title, content: content }.merge()) end |
#update_message_status(message_id, status) ⇒ Object
34 35 36 |
# File 'lib/teamlab/modules/projects/projects_discussions.rb', line 34 def (, status) @request.put(['message', .to_s, 'status'], status: status) end |