Class: GroupDocsPlatformCloud::AppApi

Inherits:
Object
  • Object
show all
Defined in:
lib/groupdocs_platform_cloud/api/app_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AppApi

Returns a new instance of AppApi.



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

def api_client
  @api_client
end

Instance Method Details

#app_delete(name, opts = {}) ⇒ File

Delete Application

Parameters:

  • name

    Application Name

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

    the optional parameters

Returns:



28
29
30
31
# File 'lib/groupdocs_platform_cloud/api/app_api.rb', line 28

def app_delete(name, opts = {})
  data, _status_code, _headers = app_delete_with_http_info(name, opts)
  return data
end

#app_delete_with_http_info(name, opts = {}) ⇒ Array<(File, Fixnum, Hash)>

Delete Application

Parameters:

  • name

    Application Name

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

    the optional parameters

Returns:

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

    File data, response status code and response headers



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
# File 'lib/groupdocs_platform_cloud/api/app_api.rb', line 38

def app_delete_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppApi.app_delete ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling AppApi.app_delete"
  end
  # resource path
  local_var_path = "/app/{name}".sub('{' + 'name' + '}', name.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 = []
  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 => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppApi#app_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#app_get(opts = {}) ⇒ Array<App>

Get List of Applications

Parameters:

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

    the optional parameters

Returns:



82
83
84
85
# File 'lib/groupdocs_platform_cloud/api/app_api.rb', line 82

def app_get(opts = {})
  data, _status_code, _headers = app_get_with_http_info(opts)
  return data
end

#app_get_by_name(name, opts = {}) ⇒ App

Get Application by Name

Parameters:

  • name

    Application Name

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

    the optional parameters

Returns:



132
133
134
135
# File 'lib/groupdocs_platform_cloud/api/app_api.rb', line 132

def app_get_by_name(name, opts = {})
  data, _status_code, _headers = app_get_by_name_with_http_info(name, opts)
  return data
end

#app_get_by_name_with_http_info(name, opts = {}) ⇒ Array<(App, Fixnum, Hash)>

Get Application by Name

Parameters:

  • name

    Application Name

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

    the optional parameters

Returns:

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

    App data, response status code and response headers



142
143
144
145
146
147
148
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
# File 'lib/groupdocs_platform_cloud/api/app_api.rb', line 142

def app_get_by_name_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppApi.app_get_by_name ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling AppApi.app_get_by_name"
  end
  # resource path
  local_var_path = "/app/{name}".sub('{' + 'name' + '}', name.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 = []
  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 => 'App')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppApi#app_get_by_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#app_get_usage(name, start, _end, opts = {}) ⇒ ApplicationUsageResponse

Get Application Usage By Period

Parameters:

  • name

    Application Name

  • start

    Period end date

  • _end

    Period end date

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

    the optional parameters

Returns:



189
190
191
192
# File 'lib/groupdocs_platform_cloud/api/app_api.rb', line 189

def app_get_usage(name, start, _end, opts = {})
  data, _status_code, _headers = app_get_usage_with_http_info(name, start, _end, opts)
  return data
end

#app_get_usage_with_http_info(name, start, _end, opts = {}) ⇒ Array<(ApplicationUsageResponse, Fixnum, Hash)>

Get Application Usage By Period

Parameters:

  • name

    Application Name

  • start

    Period end date

  • _end

    Period end date

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

    the optional parameters

Returns:

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

    ApplicationUsageResponse data, response status code and response headers



201
202
203
204
205
206
207
208
209
210
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
# File 'lib/groupdocs_platform_cloud/api/app_api.rb', line 201

def app_get_usage_with_http_info(name, start, _end, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppApi.app_get_usage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling AppApi.app_get_usage"
  end
  # verify the required parameter 'start' is set
  if @api_client.config.client_side_validation && start.nil?
    fail ArgumentError, "Missing the required parameter 'start' when calling AppApi.app_get_usage"
  end
  # verify the required parameter '_end' is set
  if @api_client.config.client_side_validation && _end.nil?
    fail ArgumentError, "Missing the required parameter '_end' when calling AppApi.app_get_usage"
  end
  # resource path
  local_var_path = "/app/{name}/usage".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'start'] = start
  query_params[:'end'] = _end

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

#app_get_with_http_info(opts = {}) ⇒ Array<(Array<App>, Fixnum, Hash)>

Get List of Applications

Parameters:

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

    the optional parameters

Returns:

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

    Array<App> data, response status code and response headers



91
92
93
94
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
# File 'lib/groupdocs_platform_cloud/api/app_api.rb', line 91

def app_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppApi.app_get ..."
  end
  # resource path
  local_var_path = "/app"

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

#app_post(opts = {}) ⇒ File

Create new Application

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :app (App)

    Application

Returns:



256
257
258
259
# File 'lib/groupdocs_platform_cloud/api/app_api.rb', line 256

def app_post(opts = {})
  data, _status_code, _headers = app_post_with_http_info(opts)
  return data
end

#app_post_with_http_info(opts = {}) ⇒ Array<(File, Fixnum, Hash)>

Create new Application

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :app (App)

    Application

Returns:

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

    File data, response status code and response headers



266
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
# File 'lib/groupdocs_platform_cloud/api/app_api.rb', line 266

def app_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppApi.app_post ..."
  end
  # resource path
  local_var_path = "/app"

  # 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(['multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'app'])
  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 => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppApi#app_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#app_put(name, opts = {}) ⇒ File

Update Application Name

Parameters:

  • name

    Application Name

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

    the optional parameters

Options Hash (opts):

  • :app (App)

    Application

Returns:



308
309
310
311
# File 'lib/groupdocs_platform_cloud/api/app_api.rb', line 308

def app_put(name, opts = {})
  data, _status_code, _headers = app_put_with_http_info(name, opts)
  return data
end

#app_put_with_http_info(name, opts = {}) ⇒ Array<(File, Fixnum, Hash)>

Update Application Name

Parameters:

  • name

    Application Name

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

    the optional parameters

Options Hash (opts):

  • :app (App)

    Application

Returns:

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

    File data, response status code and response headers



319
320
321
322
323
324
325
326
327
328
329
330
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
# File 'lib/groupdocs_platform_cloud/api/app_api.rb', line 319

def app_put_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AppApi.app_put ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling AppApi.app_put"
  end
  # resource path
  local_var_path = "/app/{name}".sub('{' + 'name' + '}', name.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(['multipart/form-data'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'app'])
  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 => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AppApi#app_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end