Class: ZoomUs::ChatbotMessages

Inherits:
Object
  • Object
show all
Defined in:
lib/zoom_us/chatbot_messages.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ChatbotMessages



19
20
21
# File 'lib/zoom_us/chatbot_messages.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/zoom_us/chatbot_messages.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#delete_a_chatbot_message(message_id, opts = {}) ⇒ InlineResponse20058

Delete a Chatbot Message Delete a message that was sent by your chatbot app. Scopes: ‘imchat:bot`
**Authorization Flow**: Client Credentials Flow
To get authorized, make a POST request to `/oauth/token` endpoint with grant type as `client_credentials`.
Use `api.zoom.us/oauth/token?grant_type=client_credentials` as the endpoint for the request. You will need to send your ClientID and Secret as a Basic base64 encoded AUthorization header. Ex. `Basic base64Encode(client_id:client_sceret)`
Next, use the token received (access_token) as a bearer token while making the DELETE /im/chat/messages/message_id request to delete a message.
Learn more about how to authotize chatbots in the [Chatbot Authorization](marketplace.zoom.us/docs/guides/chatbots/authorization) guide.

Options Hash (opts):

  • :body (Body41)


28
29
30
31
# File 'lib/zoom_us/chatbot_messages.rb', line 28

def delete_a_chatbot_message(message_id, opts = {})
  data, _status_code, _headers = delete_a_chatbot_message_with_http_info(message_id, opts)
  data
end

#delete_a_chatbot_message_with_http_info(message_id, opts = {}) ⇒ Array<(InlineResponse20058, Fixnum, Hash)>

Delete a Chatbot Message Delete a message that was sent by your chatbot app. Scopes: &#x60;imchat:bot&#x60;&lt;br&gt; **Authorization Flow**: Client Credentials Flow&lt;br&gt;&lt;br&gt; To get authorized, make a POST request to &#x60;/oauth/token&#x60; endpoint with grant type as &#x60;client_credentials&#x60;. &lt;br&gt;Use &#x60;api.zoom.us/oauth/token?grant_type&#x3D;client_credentials&#x60; as the endpoint for the request. You will need to send your ClientID and Secret as a Basic base64 encoded AUthorization header. Ex. &#x60;Basic base64Encode(client_id:client_sceret)&#x60;&lt;br&gt;&lt;br&gt; Next, use the token received (access_token) as a bearer token while making the DELETE /im/chat/messages/message_id request to delete a message.&lt;br&gt;&lt;br&gt; Learn more about how to authotize chatbots in the [Chatbot Authorization](marketplace.zoom.us/docs/guides/chatbots/authorization) guide.

Options Hash (opts):

  • :body (Body41)


39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/zoom_us/chatbot_messages.rb', line 39

def delete_a_chatbot_message_with_http_info(message_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChatbotMessagesApi.delete_a_chatbot_message ...'
  end
  # verify the required parameter 'message_id' is set
  if @api_client.config.client_side_validation && message_id.nil?
    fail ArgumentError, "Missing the required parameter 'message_id' when calling ChatbotMessagesApi.delete_a_chatbot_message"
  end
  # resource path
  local_var_path = '/im/chat/messages/{message_id}'.sub('{' + 'message_id' + '}', message_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['Client Credentials']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse20058')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChatbotMessagesApi#delete_a_chatbot_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#edit_chatbot_message(message_id, opts = {}) ⇒ InlineResponse20057

Edit a Chatbot Message Edit a message that was [sent](marketplace.zoom.us/docs/api-reference/zoom-api/im-chat/sendchatbot) by your Chatbot app.
After sending a message using the Send Chatbot Message API, you must store the messageId returned in the response so that you can make edits to the associated message using this API. Scope: ‘imchat:bot`
**Authorization Flow**: Client Credentials Flow
To get authorized, make a POST request to `/oauth/token` endpoint with grant type as `client_credentials`.
Use `api.zoom.us/oauth/token?grant_type=client_credentials` as the endpoint for the request. You will need to send your ClientID and Secret as a Basic base64 encoded AUthorization header. Ex. `Basic base64Encode(client_id:client_sceret)`
Next, use the token received (access_token) as a bearer token while making the PUT /im/chat/messages/message_id request to edit a chatbot message.
Learn more about how to authotize chatbots in the [Chatbot Authorization](marketplace.zoom.us/docs/guides/chatbots/authorization) guide.

Options Hash (opts):

  • :body (Body40)


84
85
86
87
# File 'lib/zoom_us/chatbot_messages.rb', line 84

def edit_chatbot_message(message_id, opts = {})
  data, _status_code, _headers = edit_chatbot_message_with_http_info(message_id, opts)
  data
end

#edit_chatbot_message_with_http_info(message_id, opts = {}) ⇒ Array<(InlineResponse20057, Fixnum, Hash)>

Edit a Chatbot Message Edit a message that was [sent](marketplace.zoom.us/docs/api-reference/zoom-api/im-chat/sendchatbot) by your Chatbot app.&lt;br&gt; After sending a message using the Send Chatbot Message API, you must store the messageId returned in the response so that you can make edits to the associated message using this API. Scope: &#x60;imchat:bot&#x60;&lt;br&gt;&lt;br&gt; **Authorization Flow**: Client Credentials Flow&lt;br&gt;&lt;br&gt; To get authorized, make a POST request to &#x60;/oauth/token&#x60; endpoint with grant type as &#x60;client_credentials&#x60;. &lt;br&gt;Use &#x60;api.zoom.us/oauth/token?grant_type&#x3D;client_credentials&#x60; as the endpoint for the request. You will need to send your ClientID and Secret as a Basic base64 encoded AUthorization header. Ex. &#x60;Basic base64Encode(client_id:client_sceret)&#x60;&lt;br&gt;&lt;br&gt; Next, use the token received (access_token) as a bearer token while making the PUT /im/chat/messages/message_id request to edit a chatbot message.&lt;br&gt;&lt;br&gt; Learn more about how to authotize chatbots in the [Chatbot Authorization](marketplace.zoom.us/docs/guides/chatbots/authorization) guide.

Options Hash (opts):

  • :body (Body40)


95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/zoom_us/chatbot_messages.rb', line 95

def edit_chatbot_message_with_http_info(message_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChatbotMessagesApi.edit_chatbot_message ...'
  end
  # verify the required parameter 'message_id' is set
  if @api_client.config.client_side_validation && message_id.nil?
    fail ArgumentError, "Missing the required parameter 'message_id' when calling ChatbotMessagesApi.edit_chatbot_message"
  end
  # resource path
  local_var_path = '/im/chat/messages/{message_id}'.sub('{' + 'message_id' + '}', message_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['Client Credentials']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse20057')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChatbotMessagesApi#edit_chatbot_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sendchatbot(opts = {}) ⇒ nil

Send Chatbot Messages Send chatbot messages from your marketplace chatbot app.
Scopes: ‘imchat:bot`
**Authorization Flow**: Client Credentials Flow
To get authorized, make a POST request to `/oauth/token` endpoint with grant type as `client_credentials`.
Use `api.zoom.us/oauth/token?grant_type=client_credentials` as the endpoint for the request. You will need to send your ClientID and Secret as a Basic base64 encoded AUthorization header. Ex. `Basic base64Encode(client_id:client_sceret)`
Next, use the token recieved (access_token) as a bearer token while making the POST /im/chat/messages request to send chatbot messages.
Learn more about how to authorize chatbots in the [Chatbot Authorization](marketplace.zoom.us/docs/guides/chatbots/authorization) guide.

Options Hash (opts):

  • :body (Body39)


139
140
141
142
# File 'lib/zoom_us/chatbot_messages.rb', line 139

def sendchatbot(opts = {})
  sendchatbot_with_http_info(opts)
  nil
end

#sendchatbot_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Send Chatbot Messages Send chatbot messages from your marketplace chatbot app.&lt;br&gt;&lt;br&gt; Scopes: &#x60;imchat:bot&#x60;&lt;br&gt; **Authorization Flow**: Client Credentials Flow&lt;br&gt;&lt;br&gt; To get authorized, make a POST request to &#x60;/oauth/token&#x60; endpoint with grant type as &#x60;client_credentials&#x60;. &lt;br&gt;Use &#x60;api.zoom.us/oauth/token?grant_type&#x3D;client_credentials&#x60; as the endpoint for the request. You will need to send your ClientID and Secret as a Basic base64 encoded AUthorization header. Ex. &#x60;Basic base64Encode(client_id:client_sceret)&#x60;&lt;br&gt;&lt;br&gt; Next, use the token recieved (access_token) as a bearer token while making the POST /im/chat/messages request to send chatbot messages.&lt;br&gt;&lt;br&gt; Learn more about how to authorize chatbots in the [Chatbot Authorization](marketplace.zoom.us/docs/guides/chatbots/authorization) guide.

Options Hash (opts):

  • :body (Body39)


149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/zoom_us/chatbot_messages.rb', line 149

def sendchatbot_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChatbotMessagesApi.sendchatbot ...'
  end
  # resource path
  local_var_path = '/im/chat/messages'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  auth_names = ['Client Credentials']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChatbotMessagesApi#sendchatbot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end