Class: LaunchDarklyApi::DataExportDestinationsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/launchdarkly_api/api/data_export_destinations_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DataExportDestinationsApi

Returns a new instance of DataExportDestinationsApi.



19
20
21
# File 'lib/launchdarkly_api/api/data_export_destinations_api.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/launchdarkly_api/api/data_export_destinations_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#delete_destination(project_key, environment_key, destination_id, opts = {}) ⇒ nil

Get a single data export destination by ID

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • destination_id

    The data export destination ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


28
29
30
31
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 28

def delete_destination(project_key, environment_key, destination_id, opts = {})
  delete_destination_with_http_info(project_key, environment_key, destination_id, opts)
  nil
end

#delete_destination_with_http_info(project_key, environment_key, destination_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Get a single data export destination by ID

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • destination_id

    The data export destination ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
80
81
82
83
84
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 39

def delete_destination_with_http_info(project_key, environment_key, destination_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.delete_destination ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling DataExportDestinationsApi.delete_destination"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling DataExportDestinationsApi.delete_destination"
  end
  # verify the required parameter 'destination_id' is set
  if @api_client.config.client_side_validation && destination_id.nil?
    fail ArgumentError, "Missing the required parameter 'destination_id' when calling DataExportDestinationsApi.delete_destination"
  end
  # resource path
  local_var_path = '/destinations/{projectKey}/{environmentKey}/{destinationId}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'destinationId' + '}', destination_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'])
  # 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 = ['Token']
  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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DataExportDestinationsApi#delete_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_destination(project_key, environment_key, destination_id, opts = {}) ⇒ Destination

Get a single data export destination by ID

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • destination_id

    The data export destination ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



91
92
93
94
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 91

def get_destination(project_key, environment_key, destination_id, opts = {})
  data, _status_code, _headers = get_destination_with_http_info(project_key, environment_key, destination_id, opts)
  data
end

#get_destination_with_http_info(project_key, environment_key, destination_id, opts = {}) ⇒ Array<(Destination, Fixnum, Hash)>

Get a single data export destination by ID

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • destination_id

    The data export destination ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Destination data, response status code and response headers



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
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 102

def get_destination_with_http_info(project_key, environment_key, destination_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.get_destination ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling DataExportDestinationsApi.get_destination"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling DataExportDestinationsApi.get_destination"
  end
  # verify the required parameter 'destination_id' is set
  if @api_client.config.client_side_validation && destination_id.nil?
    fail ArgumentError, "Missing the required parameter 'destination_id' when calling DataExportDestinationsApi.get_destination"
  end
  # resource path
  local_var_path = '/destinations/{projectKey}/{environmentKey}/{destinationId}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'destinationId' + '}', destination_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'])
  # 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 = ['Token']
  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 => 'Destination')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DataExportDestinationsApi#get_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_destinations(opts = {}) ⇒ Destinations

Returns a list of all data export destinations.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



152
153
154
155
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 152

def get_destinations(opts = {})
  data, _status_code, _headers = get_destinations_with_http_info(opts)
  data
end

#get_destinations_with_http_info(opts = {}) ⇒ Array<(Destinations, Fixnum, Hash)>

Returns a list of all data export destinations.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Destinations data, response status code and response headers



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
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 160

def get_destinations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.get_destinations ...'
  end
  # resource path
  local_var_path = '/destinations'

  # query parameters
  query_params = {}

  # 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 = ['Token']
  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 => 'Destinations')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DataExportDestinationsApi#get_destinations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_destination(project_key, environment_key, destination_id, patch_only, opts = {}) ⇒ Destination

Perform a partial update to a data export destination.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • destination_id

    The data export destination ID.

  • patch_only

    Requires a JSON Patch representation of the desired changes to the project. &#39;jsonpatch.com/&#39; Feature flag patches also support JSON Merge Patch format. &#39;tools.ietf.org/html/rfc7386&#39; The addition of comments is also supported.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



202
203
204
205
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 202

def patch_destination(project_key, environment_key, destination_id, patch_only, opts = {})
  data, _status_code, _headers = patch_destination_with_http_info(project_key, environment_key, destination_id, patch_only, opts)
  data
end

#patch_destination_with_http_info(project_key, environment_key, destination_id, patch_only, opts = {}) ⇒ Array<(Destination, Fixnum, Hash)>

Perform a partial update to a data export destination.

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • destination_id

    The data export destination ID.

  • patch_only

    Requires a JSON Patch representation of the desired changes to the project. &#39;jsonpatch.com/&#39; Feature flag patches also support JSON Merge Patch format. &#39;tools.ietf.org/html/rfc7386&#39; The addition of comments is also supported.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Destination data, response status code and response headers



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
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 214

def patch_destination_with_http_info(project_key, environment_key, destination_id, patch_only, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.patch_destination ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling DataExportDestinationsApi.patch_destination"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling DataExportDestinationsApi.patch_destination"
  end
  # verify the required parameter 'destination_id' is set
  if @api_client.config.client_side_validation && destination_id.nil?
    fail ArgumentError, "Missing the required parameter 'destination_id' when calling DataExportDestinationsApi.patch_destination"
  end
  # verify the required parameter 'patch_only' is set
  if @api_client.config.client_side_validation && patch_only.nil?
    fail ArgumentError, "Missing the required parameter 'patch_only' when calling DataExportDestinationsApi.patch_destination"
  end
  # resource path
  local_var_path = '/destinations/{projectKey}/{environmentKey}/{destinationId}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'destinationId' + '}', destination_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'])
  # 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 = @api_client.object_to_http_body(patch_only)
  auth_names = ['Token']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Destination')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DataExportDestinationsApi#patch_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_destination(project_key, environment_key, destination_body, opts = {}) ⇒ Destination

Create a new data export destination

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • destination_body

    Create a new data export destination.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



271
272
273
274
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 271

def post_destination(project_key, environment_key, destination_body, opts = {})
  data, _status_code, _headers = post_destination_with_http_info(project_key, environment_key, destination_body, opts)
  data
end

#post_destination_with_http_info(project_key, environment_key, destination_body, opts = {}) ⇒ Array<(Destination, Fixnum, Hash)>

Create a new data export destination

Parameters:

  • project_key

    The project key, used to tie the flags together under one project so they can be managed together.

  • environment_key

    The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

  • destination_body

    Create a new data export destination.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Destination data, response status code and response headers



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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 282

def post_destination_with_http_info(project_key, environment_key, destination_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.post_destination ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling DataExportDestinationsApi.post_destination"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling DataExportDestinationsApi.post_destination"
  end
  # verify the required parameter 'destination_body' is set
  if @api_client.config.client_side_validation && destination_body.nil?
    fail ArgumentError, "Missing the required parameter 'destination_body' when calling DataExportDestinationsApi.post_destination"
  end
  # resource path
  local_var_path = '/destinations/{projectKey}/{environmentKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.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'])
  # 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 = @api_client.object_to_http_body(destination_body)
  auth_names = ['Token']
  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 => 'Destination')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DataExportDestinationsApi#post_destination\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end