Module: Frontapp::Client::Conversations
- Included in:
- Frontapp::Client
- Defined in:
- lib/frontapp/client/conversations.rb
Instance Method Summary collapse
-
#add_conversation_followers!(conversation_id, params = {}) ⇒ Object
Parameters Name Type Description ———————————————- conversation_id string The conversation Id teammate_ids array of strings follower IDs to add ———————————————-.
-
#add_conversation_links!(conversation_id, params = {}) ⇒ Object
Parameters Name Type Description ———————————————- conversation_id string The conversation Id link_ids array (optional) Link IDs to add Either link_ids or link_external_urls must be specified but not both link_external_urls array (optional) Link external urls to add.
- #conversations(params = {}) ⇒ Object
-
#get_conversation(conversation_id) ⇒ Object
Parameters Name Type Description ———————————— conversation_id string Id of the requested conversation ————————————.
-
#get_conversation_events(conversation_id) ⇒ Object
Parameters Name Type Description ——————————– conversation_id string Id or email of the requested conversation ——————————–.
-
#get_conversation_followers(conversation_id) ⇒ Object
Parameters Name Type Description ——————————– conversation_id string Id or email of the requested conversation ——————————–.
-
#get_conversation_inboxes(conversation_id) ⇒ Object
Parameters Name Type Description ——————————– conversation_id string Id or email of the requested conversation ——————————–.
-
#get_conversation_messages(conversation_id) ⇒ Object
Parameters Name Type Description ——————————– conversation_id string Id or email of the requested conversation ——————————–.
-
#remove_conversation_followers!(conversation_id, params = {}) ⇒ Object
Parameters Name Type Description ———————————————- conversation_id string The conversation Id teammate_ids array of strings follower IDs to remove ———————————————-.
-
#remove_conversation_links!(conversation_id, params = {}) ⇒ Object
Parameters Name Type Description ———————————————- conversation_id string The conversation Id link_ids array of strings link IDs to remove ———————————————-.
-
#update_conversation!(conversation_id, params = {}) ⇒ Object
Parameters Name Type Description ———————————— conversation_id string Id of the requested conversation ————————————.
Instance Method Details
#add_conversation_followers!(conversation_id, params = {}) ⇒ Object
Parameters Name Type Description
conversation_id string The conversation Id teammate_ids array of strings follower IDs to add
114 115 116 117 |
# File 'lib/frontapp/client/conversations.rb', line 114 def add_conversation_followers!(conversation_id, params = {}) cleaned = params.permit(:teammate_ids) create_without_response("conversations/#{conversation_id}/followers", cleaned) end |
#add_conversation_links!(conversation_id, params = {}) ⇒ Object
Parameters Name Type Description
conversation_id string The conversation Id link_ids array (optional) Link IDs to add Either link_ids or link_external_urls must be specified but not both link_external_urls array (optional) Link external urls to add. Creates links if necessary. Either link_ids or link_external_urls must be specified but not both
81 82 83 84 |
# File 'lib/frontapp/client/conversations.rb', line 81 def add_conversation_links!(conversation_id, params = {}) cleaned = params.permit(:link_ids, :link_external_urls) create_without_response("conversations/#{conversation_id}/links", cleaned) end |
#conversations(params = {}) ⇒ Object
5 6 7 |
# File 'lib/frontapp/client/conversations.rb', line 5 def conversations(params = {}) list("conversations", params) end |
#get_conversation(conversation_id) ⇒ Object
Parameters Name Type Description
conversation_id string Id of the requested conversation
14 15 16 |
# File 'lib/frontapp/client/conversations.rb', line 14 def get_conversation(conversation_id) get("conversations/#{conversation_id}") end |
#get_conversation_events(conversation_id) ⇒ Object
Parameters Name Type Description
conversation_id string Id or email of the requested conversation
61 62 63 |
# File 'lib/frontapp/client/conversations.rb', line 61 def get_conversation_events(conversation_id) list("conversations/#{conversation_id}/events") end |
#get_conversation_followers(conversation_id) ⇒ Object
Parameters Name Type Description
conversation_id string Id or email of the requested conversation
52 53 54 |
# File 'lib/frontapp/client/conversations.rb', line 52 def get_conversation_followers(conversation_id) get("conversations/#{conversation_id}/followers") end |
#get_conversation_inboxes(conversation_id) ⇒ Object
Parameters Name Type Description
conversation_id string Id or email of the requested conversation
43 44 45 |
# File 'lib/frontapp/client/conversations.rb', line 43 def get_conversation_inboxes(conversation_id) get("conversations/#{conversation_id}/inboxes") end |
#get_conversation_messages(conversation_id) ⇒ Object
Parameters Name Type Description
conversation_id string Id or email of the requested conversation
70 71 72 |
# File 'lib/frontapp/client/conversations.rb', line 70 def (conversation_id) list("conversations/#{conversation_id}/messages") end |
#remove_conversation_followers!(conversation_id, params = {}) ⇒ Object
Parameters Name Type Description
conversation_id string The conversation Id teammate_ids array of strings follower IDs to remove
103 104 105 106 |
# File 'lib/frontapp/client/conversations.rb', line 103 def remove_conversation_followers!(conversation_id, params = {}) cleaned = params.permit(:teammate_ids) delete("conversations/#{conversation_id}/followers", cleaned) end |
#remove_conversation_links!(conversation_id, params = {}) ⇒ Object
Parameters Name Type Description
conversation_id string The conversation Id link_ids array of strings link IDs to remove
92 93 94 95 |
# File 'lib/frontapp/client/conversations.rb', line 92 def remove_conversation_links!(conversation_id, params = {}) cleaned = params.permit(:link_ids) delete("conversations/#{conversation_id}/links", cleaned) end |
#update_conversation!(conversation_id, params = {}) ⇒ Object
Parameters Name Type Description
conversation_id string Id of the requested conversation
Allowed attributes: Name Type Description
assignee_id string (optional) ID of the teammate to assign the conversation to. Set it to null to unassign. inbox_id string (optional) ID of the inbox to move the conversation to. status enum (optional) New status of the conversation tags array (optional) List of all the tag names replacing the old conversation tags
The assignee id is their Frontapp handle, e.g. @username
33 34 35 36 |
# File 'lib/frontapp/client/conversations.rb', line 33 def update_conversation!(conversation_id, params = {}) cleaned = params.permit(:assignee_id, :inbox_id, :status, :tags) update("conversations/#{conversation_id}", cleaned) end |