Class: DocuSign_Monitor::DataSetApi

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_monitor/api/data_set_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = DataSetApi.default) ⇒ DataSetApi

Returns a new instance of DataSetApi.



32
33
34
# File 'lib/docusign_monitor/api/data_set_api.rb', line 32

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



30
31
32
# File 'lib/docusign_monitor/api/data_set_api.rb', line 30

def api_client
  @api_client
end

Instance Method Details

#get_stream(data_set_name, version, options = DocuSign_Monitor::GetStreamOptions.default) ⇒ CursoredResult

Gets customer event data for an organization. Gets customer event data for the organization that owns the integration key. The results for this endpoint are paginated by event timestamp. Use the ‘cursor` parameter to specify where the query begins in the dataset. Use the `limit` parameter to set the number of records returned.

Parameters:

  • data_set_name

    Must be ‘monitor`.

  • version

    Must be ‘2`.

  • DocuSign_Monitor::GetStreamOptions

    Options for modifying the behavior of the function.

Returns:



42
43
44
45
# File 'lib/docusign_monitor/api/data_set_api.rb', line 42

def get_stream(data_set_name, version, options = DocuSign_Monitor::GetStreamOptions.default)
  data, _status_code, _headers = get_stream_with_http_info(data_set_name, version, options)
  return data
end

#get_stream_with_http_info(data_set_name, version, options = DocuSign_Monitor::GetStreamOptions.default) ⇒ Array<(CursoredResult, Fixnum, Hash)>

Gets customer event data for an organization. Gets customer event data for the organization that owns the integration key. The results for this endpoint are paginated by event timestamp. Use the &#x60;cursor&#x60; parameter to specify where the query begins in the dataset. Use the &#x60;limit&#x60; parameter to set the number of records returned.

Parameters:

  • data_set_name

    Must be ‘monitor`.

  • version

    Must be ‘2`.

  • DocuSign_Monitor::GetStreamOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(CursoredResult, Fixnum, Hash)>)

    CursoredResult data, response status code and response headers



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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/docusign_monitor/api/data_set_api.rb', line 53

def get_stream_with_http_info(data_set_name, version, options = DocuSign_Monitor::GetStreamOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DataSetApi.get_stream ..."
  end
  # verify the required parameter 'data_set_name' is set
  fail ArgumentError, "Missing the required parameter 'data_set_name' when calling DataSetApi.get_stream" if data_set_name.nil?
  # verify the required parameter 'version' is set
  fail ArgumentError, "Missing the required parameter 'version' when calling DataSetApi.get_stream" if version.nil?
  # resource path
  local_var_path = "/api/v{version}/datasets/{dataSetName}/stream".sub('{format}','json').sub('{' + 'dataSetName' + '}', data_set_name.to_s).sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'cursor'] = options.cursor if !options.cursor.nil?
  query_params[:'limit'] = options.limit if !options.limit.nil?

  # header parameters
  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 = {}

  # http body (model)
  post_body = nil
  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 => 'CursoredResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DataSetApi#get_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end