Class: GongAPI::CallsApi
- Inherits:
-
Object
- Object
- GongAPI::CallsApi
- Defined in:
- lib/gong_api/api/calls_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_call_recording_using_put(id, opts = {}) ⇒ NewCallRecordingResponse
Add call media (/v2/calls/id/media) Adds a call media, recorded by a telephony system (PBX) or other media recording facility.
-
#add_call_recording_using_put_with_http_info(id, opts = {}) ⇒ Array<(NewCallRecordingResponse, Integer, Hash)>
Add call media (/v2/calls/id/media) Adds a call media, recorded by a telephony system (PBX) or other media recording facility.
-
#add_call_using_post(body, opts = {}) ⇒ NewCallAddingResponse
Add new call (/v2/calls) When using this endpoint, either provide a downloadMediaUrl or use the returned callId in a follow-up request to /v2/calls/id/media to upload the media file.
-
#add_call_using_post_with_http_info(body, opts = {}) ⇒ Array<(NewCallAddingResponse, Integer, Hash)>
Add new call (/v2/calls) When using this endpoint, either provide a downloadMediaUrl or use the returned callId in a follow-up request to /v2/calls/id/media to upload the media file.
-
#get_call_transcripts_using_post(body, opts = {}) ⇒ CallTranscripts
Retrieve transcripts of calls by date or callIds (/v2/calls/transcript) Lists the transcripts of calls that took place during a specified date range and have specified callIds.
-
#get_call_transcripts_using_post_with_http_info(body, opts = {}) ⇒ Array<(CallTranscripts, Integer, Hash)>
Retrieve transcripts of calls by date or callIds (/v2/calls/transcript) Lists the transcripts of calls that took place during a specified date range and have specified callIds.
-
#get_call_using_get(id, opts = {}) ⇒ SpecificCall
Retrieve data for a specific call (/v2/calls/id) Retrieve data for a specific call.
-
#get_call_using_get_with_http_info(id, opts = {}) ⇒ Array<(SpecificCall, Integer, Hash)>
Retrieve data for a specific call (/v2/calls/id) Retrieve data for a specific call.
-
#initialize(api_client = ApiClient.default) ⇒ CallsApi
constructor
A new instance of CallsApi.
-
#list_calls_extensive_using_post(body, opts = {}) ⇒ Calls
Retrieve detailed call data by various filters (/v2/calls/extensive) Lists detailed call data for calls that took place during a specified date range, have specified call IDs or hosted by specified users.
-
#list_calls_extensive_using_post_with_http_info(body, opts = {}) ⇒ Array<(Calls, Integer, Hash)>
Retrieve detailed call data by various filters (/v2/calls/extensive) Lists detailed call data for calls that took place during a specified date range, have specified call IDs or hosted by specified users.
-
#list_calls_using_get1(from_date_time, to_date_time, opts = {}) ⇒ CallsResponse
Retrieve call data by date range (/v2/calls) List calls that took place during a specified date range.
-
#list_calls_using_get1_with_http_info(from_date_time, to_date_time, opts = {}) ⇒ Array<(CallsResponse, Integer, Hash)>
Retrieve call data by date range (/v2/calls) List calls that took place during a specified date range.
-
#list_crm_calls_manual_association_using_get(opts = {}) ⇒ ManualAssociationResponse
List all calls that were manually associated with CRM objects (/v2/calls/manual-crm-associations) in Beta Phase Returns a list of all calls that were manually associated or re-associated with CRM account and deal/opportunity since a given time.
-
#list_crm_calls_manual_association_using_get_with_http_info(opts = {}) ⇒ Array<(ManualAssociationResponse, Integer, Hash)>
List all calls that were manually associated with CRM objects (/v2/calls/manual-crm-associations) in Beta Phase Returns a list of all calls that were manually associated or re-associated with CRM account and deal/opportunity since a given time.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CallsApi
Returns a new instance of CallsApi.
16 17 18 |
# File 'lib/gong_api/api/calls_api.rb', line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
14 15 16 |
# File 'lib/gong_api/api/calls_api.rb', line 14 def api_client @api_client end |
Instance Method Details
#add_call_recording_using_put(id, opts = {}) ⇒ NewCallRecordingResponse
Add call media (/v2/calls/id/media) Adds a call media, recorded by a telephony system (PBX) or other media recording facility. Gong accepts call recordings in various audio and video file formats, including WAV, MP3, MP4, MKV and FLAC. If uploading a dual-channel (stereo) file separated by speaker, make sure to specify which channel correspondsto the company team member (rep) in the parties/mediaChannelId parameter of the Add New Call operation. When accessed through a Bearer token authorization method, this endpoint requires the scope ‘api:calls:create’.
25 26 27 28 |
# File 'lib/gong_api/api/calls_api.rb', line 25 def add_call_recording_using_put(id, opts = {}) data, _status_code, _headers = add_call_recording_using_put_with_http_info(id, opts) data end |
#add_call_recording_using_put_with_http_info(id, opts = {}) ⇒ Array<(NewCallRecordingResponse, Integer, Hash)>
Add call media (/v2/calls/id/media) Adds a call media, recorded by a telephony system (PBX) or other media recording facility. Gong accepts call recordings in various audio and video file formats, including WAV, MP3, MP4, MKV and FLAC. If uploading a dual-channel (stereo) file separated by speaker, make sure to specify which channel correspondsto the company team member (rep) in the parties/mediaChannelId parameter of the Add New Call operation. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:calls:create'.
36 37 38 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 78 79 |
# File 'lib/gong_api/api/calls_api.rb', line 36 def add_call_recording_using_put_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallsApi.add_call_recording_using_put ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CallsApi.add_call_recording_using_put" end # resource path local_var_path = '/v2/calls/{id}/media'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = opts[:form_params] || {} form_params['mediaFile'] = opts[:'media_file'] if !opts[:'media_file'].nil? # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'NewCallRecordingResponse' auth_names = opts[:auth_names] || [] 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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallsApi#add_call_recording_using_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#add_call_using_post(body, opts = {}) ⇒ NewCallAddingResponse
Add new call (/v2/calls) When using this endpoint, either provide a downloadMediaUrl or use the returned callId in a follow-up request to /v2/calls/id/media to upload the media file. When accessed through a Bearer token authorization method, this endpoint requires the scope ‘api:calls:create’.
85 86 87 88 |
# File 'lib/gong_api/api/calls_api.rb', line 85 def add_call_using_post(body, opts = {}) data, _status_code, _headers = add_call_using_post_with_http_info(body, opts) data end |
#add_call_using_post_with_http_info(body, opts = {}) ⇒ Array<(NewCallAddingResponse, Integer, Hash)>
Add new call (/v2/calls) When using this endpoint, either provide a downloadMediaUrl or use the returned callId in a follow-up request to /v2/calls/id/media to upload the media file. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:calls:create'.
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 134 135 136 137 |
# File 'lib/gong_api/api/calls_api.rb', line 95 def add_call_using_post_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallsApi.add_call_using_post ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CallsApi.add_call_using_post" end # resource path local_var_path = '/v2/calls' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'NewCallAddingResponse' auth_names = opts[:auth_names] || [] 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, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallsApi#add_call_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_call_transcripts_using_post(body, opts = {}) ⇒ CallTranscripts
Retrieve transcripts of calls by date or callIds (/v2/calls/transcript) Lists the transcripts of calls that took place during a specified date range and have specified callIds. When accessed through a Bearer token authorization method, this endpoint requires the scope ‘api:calls:read:transcript’.
143 144 145 146 |
# File 'lib/gong_api/api/calls_api.rb', line 143 def get_call_transcripts_using_post(body, opts = {}) data, _status_code, _headers = get_call_transcripts_using_post_with_http_info(body, opts) data end |
#get_call_transcripts_using_post_with_http_info(body, opts = {}) ⇒ Array<(CallTranscripts, Integer, Hash)>
Retrieve transcripts of calls by date or callIds (/v2/calls/transcript) Lists the transcripts of calls that took place during a specified date range and have specified callIds. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:calls:read:transcript'.
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 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/gong_api/api/calls_api.rb', line 153 def get_call_transcripts_using_post_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallsApi.get_call_transcripts_using_post ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CallsApi.get_call_transcripts_using_post" end # resource path local_var_path = '/v2/calls/transcript' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'CallTranscripts' auth_names = opts[:auth_names] || [] 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, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallsApi#get_call_transcripts_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_call_using_get(id, opts = {}) ⇒ SpecificCall
Retrieve data for a specific call (/v2/calls/id) Retrieve data for a specific call. When accessed through a Bearer token authorization method, this endpoint requires the scope ‘api:calls:read:basic’.
201 202 203 204 |
# File 'lib/gong_api/api/calls_api.rb', line 201 def get_call_using_get(id, opts = {}) data, _status_code, _headers = get_call_using_get_with_http_info(id, opts) data end |
#get_call_using_get_with_http_info(id, opts = {}) ⇒ Array<(SpecificCall, Integer, Hash)>
Retrieve data for a specific call (/v2/calls/id) Retrieve data for a specific call. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:calls:read:basic'.
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/gong_api/api/calls_api.rb', line 211 def get_call_using_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallsApi.get_call_using_get ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CallsApi.get_call_using_get" end # resource path local_var_path = '/v2/calls/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'SpecificCall' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallsApi#get_call_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_calls_extensive_using_post(body, opts = {}) ⇒ Calls
Retrieve detailed call data by various filters (/v2/calls/extensive) Lists detailed call data for calls that took place during a specified date range, have specified call IDs or hosted by specified users. When accessed through a Bearer token authorization method, this endpoint requires the scope ‘api:calls:read:extensive’. Moreover, clients requesting media download URLs by the contentSelector.exposedFields.media field should also have the scope ‘api:calls:read:media-url’.
257 258 259 260 |
# File 'lib/gong_api/api/calls_api.rb', line 257 def list_calls_extensive_using_post(body, opts = {}) data, _status_code, _headers = list_calls_extensive_using_post_with_http_info(body, opts) data end |
#list_calls_extensive_using_post_with_http_info(body, opts = {}) ⇒ Array<(Calls, Integer, Hash)>
Retrieve detailed call data by various filters (/v2/calls/extensive) Lists detailed call data for calls that took place during a specified date range, have specified call IDs or hosted by specified users. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:calls:read:extensive'. Moreover, clients requesting media download URLs by the contentSelector.exposedFields.media field should also have the scope 'api:calls:read:media-url'.
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
# File 'lib/gong_api/api/calls_api.rb', line 267 def list_calls_extensive_using_post_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallsApi.list_calls_extensive_using_post ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CallsApi.list_calls_extensive_using_post" end # resource path local_var_path = '/v2/calls/extensive' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'Calls' auth_names = opts[:auth_names] || [] 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, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallsApi#list_calls_extensive_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_calls_using_get1(from_date_time, to_date_time, opts = {}) ⇒ CallsResponse
Retrieve call data by date range (/v2/calls) List calls that took place during a specified date range. When accessed through a Bearer token authorization method, this endpoint requires the scope ‘api:calls:read:basic’.
318 319 320 321 |
# File 'lib/gong_api/api/calls_api.rb', line 318 def list_calls_using_get1(from_date_time, to_date_time, opts = {}) data, _status_code, _headers = list_calls_using_get1_with_http_info(from_date_time, to_date_time, opts) data end |
#list_calls_using_get1_with_http_info(from_date_time, to_date_time, opts = {}) ⇒ Array<(CallsResponse, Integer, Hash)>
Retrieve call data by date range (/v2/calls) List calls that took place during a specified date range. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:calls:read:basic'.
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 |
# File 'lib/gong_api/api/calls_api.rb', line 331 def list_calls_using_get1_with_http_info(from_date_time, to_date_time, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallsApi.list_calls_using_get1 ...' end # verify the required parameter 'from_date_time' is set if @api_client.config.client_side_validation && from_date_time.nil? fail ArgumentError, "Missing the required parameter 'from_date_time' when calling CallsApi.list_calls_using_get1" end # verify the required parameter 'to_date_time' is set if @api_client.config.client_side_validation && to_date_time.nil? fail ArgumentError, "Missing the required parameter 'to_date_time' when calling CallsApi.list_calls_using_get1" end # resource path local_var_path = '/v2/calls' # query parameters query_params = opts[:query_params] || {} query_params[:'fromDateTime'] = from_date_time query_params[:'toDateTime'] = to_date_time query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'workspaceId'] = opts[:'workspace_id'] if !opts[:'workspace_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'CallsResponse' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallsApi#list_calls_using_get1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_crm_calls_manual_association_using_get(opts = {}) ⇒ ManualAssociationResponse
List all calls that were manually associated with CRM objects (/v2/calls/manual-crm-associations) in Beta Phase Returns a list of all calls that were manually associated or re-associated with CRM account and deal/opportunity since a given time. Actions will be listed in the ascending order of their timing. Notice if a call was associated and later re-associated the API will return both events. When accessed through a Bearer token authorization method, this endpoint requires the scope ‘api:crm-calls:manual-association:read’.
386 387 388 389 |
# File 'lib/gong_api/api/calls_api.rb', line 386 def list_crm_calls_manual_association_using_get(opts = {}) data, _status_code, _headers = list_crm_calls_manual_association_using_get_with_http_info(opts) data end |
#list_crm_calls_manual_association_using_get_with_http_info(opts = {}) ⇒ Array<(ManualAssociationResponse, Integer, Hash)>
List all calls that were manually associated with CRM objects (/v2/calls/manual-crm-associations) in Beta Phase Returns a list of all calls that were manually associated or re-associated with CRM account and deal/opportunity since a given time. Actions will be listed in the ascending order of their timing. Notice if a call was associated and later re-associated the API will return both events. When accessed through a Bearer token authorization method, this endpoint requires the scope 'api:crm-calls:manual-association:read'.
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 |
# File 'lib/gong_api/api/calls_api.rb', line 397 def list_crm_calls_manual_association_using_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CallsApi.list_crm_calls_manual_association_using_get ...' end # resource path local_var_path = '/v2/calls/manual-crm-associations' # query parameters query_params = opts[:query_params] || {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'fromDateTime'] = opts[:'from_date_time'] if !opts[:'from_date_time'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'ManualAssociationResponse' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: CallsApi#list_crm_calls_manual_association_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |