yalla_auth_ruby_client 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +111 -0
- data/Rakefile +10 -0
- data/docs/App.md +32 -0
- data/docs/AppsApi.md +399 -0
- data/docs/AuthApi.md +70 -0
- data/docs/AuthValidateTokenGet200Response.md +20 -0
- data/docs/Role.md +34 -0
- data/docs/User.md +30 -0
- data/docs/UserAppAdd.md +18 -0
- data/docs/UserRoleAdd.md +24 -0
- data/docs/UsersApi.md +531 -0
- data/git_push.sh +57 -0
- data/lib/openapi_client/api/apps_api.rb +439 -0
- data/lib/openapi_client/api/auth_api.rb +84 -0
- data/lib/openapi_client/api/users_api.rb +587 -0
- data/lib/openapi_client/api_client.rb +392 -0
- data/lib/openapi_client/api_error.rb +58 -0
- data/lib/openapi_client/configuration.rb +311 -0
- data/lib/openapi_client/models/app.rb +283 -0
- data/lib/openapi_client/models/auth_validate_token_get200_response.rb +229 -0
- data/lib/openapi_client/models/role.rb +292 -0
- data/lib/openapi_client/models/user.rb +274 -0
- data/lib/openapi_client/models/user_app_add.rb +220 -0
- data/lib/openapi_client/models/user_role_add.rb +247 -0
- data/lib/openapi_client/version.rb +15 -0
- data/lib/openapi_client.rb +48 -0
- data/spec/api/apps_api_spec.rb +108 -0
- data/spec/api/auth_api_spec.rb +46 -0
- data/spec/api/users_api_spec.rb +134 -0
- data/spec/models/app_spec.rb +78 -0
- data/spec/models/auth_validate_token_get200_response_spec.rb +42 -0
- data/spec/models/role_spec.rb +84 -0
- data/spec/models/user_app_add_spec.rb +36 -0
- data/spec/models/user_role_add_spec.rb +54 -0
- data/spec/models/user_spec.rb +72 -0
- data/spec/spec_helper.rb +111 -0
- data/yalla_auth_ruby_client.gemspec +39 -0
- metadata +128 -0
@@ -0,0 +1,439 @@
|
|
1
|
+
=begin
|
2
|
+
#API V1
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.12.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module OpenapiClient
|
16
|
+
class AppsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# create app
|
23
|
+
# @param access_token [String]
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [App] :app
|
26
|
+
# @return [nil]
|
27
|
+
def create_app(access_token, opts = {})
|
28
|
+
create_app_with_http_info(access_token, opts)
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
|
32
|
+
# create app
|
33
|
+
# @param access_token [String]
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @option opts [App] :app
|
36
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
37
|
+
def create_app_with_http_info(access_token, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: AppsApi.create_app ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'access_token' is set
|
42
|
+
if @api_client.config.client_side_validation && access_token.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'access_token' when calling AppsApi.create_app"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/api/v1/apps'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
57
|
+
if !content_type.nil?
|
58
|
+
header_params['Content-Type'] = content_type
|
59
|
+
end
|
60
|
+
header_params[:'access-token'] = access_token
|
61
|
+
|
62
|
+
# form parameters
|
63
|
+
form_params = opts[:form_params] || {}
|
64
|
+
|
65
|
+
# http body (model)
|
66
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'app'])
|
67
|
+
|
68
|
+
# return_type
|
69
|
+
return_type = opts[:debug_return_type]
|
70
|
+
|
71
|
+
# auth_names
|
72
|
+
auth_names = opts[:debug_auth_names] || []
|
73
|
+
|
74
|
+
new_options = opts.merge(
|
75
|
+
:operation => :"AppsApi.create_app",
|
76
|
+
:header_params => header_params,
|
77
|
+
:query_params => query_params,
|
78
|
+
:form_params => form_params,
|
79
|
+
:body => post_body,
|
80
|
+
:auth_names => auth_names,
|
81
|
+
:return_type => return_type
|
82
|
+
)
|
83
|
+
|
84
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
85
|
+
if @api_client.config.debugging
|
86
|
+
@api_client.config.logger.debug "API called: AppsApi#create_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
87
|
+
end
|
88
|
+
return data, status_code, headers
|
89
|
+
end
|
90
|
+
|
91
|
+
# delete app
|
92
|
+
# @param access_token [String]
|
93
|
+
# @param id [String] id
|
94
|
+
# @param [Hash] opts the optional parameters
|
95
|
+
# @return [nil]
|
96
|
+
def delete_app(access_token, id, opts = {})
|
97
|
+
delete_app_with_http_info(access_token, id, opts)
|
98
|
+
nil
|
99
|
+
end
|
100
|
+
|
101
|
+
# delete app
|
102
|
+
# @param access_token [String]
|
103
|
+
# @param id [String] id
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
106
|
+
def delete_app_with_http_info(access_token, id, opts = {})
|
107
|
+
if @api_client.config.debugging
|
108
|
+
@api_client.config.logger.debug 'Calling API: AppsApi.delete_app ...'
|
109
|
+
end
|
110
|
+
# verify the required parameter 'access_token' is set
|
111
|
+
if @api_client.config.client_side_validation && access_token.nil?
|
112
|
+
fail ArgumentError, "Missing the required parameter 'access_token' when calling AppsApi.delete_app"
|
113
|
+
end
|
114
|
+
# verify the required parameter 'id' is set
|
115
|
+
if @api_client.config.client_side_validation && id.nil?
|
116
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AppsApi.delete_app"
|
117
|
+
end
|
118
|
+
# resource path
|
119
|
+
local_var_path = '/api/v1/apps/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
120
|
+
|
121
|
+
# query parameters
|
122
|
+
query_params = opts[:query_params] || {}
|
123
|
+
|
124
|
+
# header parameters
|
125
|
+
header_params = opts[:header_params] || {}
|
126
|
+
# HTTP header 'Accept' (if needed)
|
127
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
128
|
+
header_params[:'access-token'] = access_token
|
129
|
+
|
130
|
+
# form parameters
|
131
|
+
form_params = opts[:form_params] || {}
|
132
|
+
|
133
|
+
# http body (model)
|
134
|
+
post_body = opts[:debug_body]
|
135
|
+
|
136
|
+
# return_type
|
137
|
+
return_type = opts[:debug_return_type]
|
138
|
+
|
139
|
+
# auth_names
|
140
|
+
auth_names = opts[:debug_auth_names] || []
|
141
|
+
|
142
|
+
new_options = opts.merge(
|
143
|
+
:operation => :"AppsApi.delete_app",
|
144
|
+
:header_params => header_params,
|
145
|
+
:query_params => query_params,
|
146
|
+
:form_params => form_params,
|
147
|
+
:body => post_body,
|
148
|
+
:auth_names => auth_names,
|
149
|
+
:return_type => return_type
|
150
|
+
)
|
151
|
+
|
152
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
153
|
+
if @api_client.config.debugging
|
154
|
+
@api_client.config.logger.debug "API called: AppsApi#delete_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
155
|
+
end
|
156
|
+
return data, status_code, headers
|
157
|
+
end
|
158
|
+
|
159
|
+
# show app
|
160
|
+
# @param access_token [String]
|
161
|
+
# @param id [String] id
|
162
|
+
# @param [Hash] opts the optional parameters
|
163
|
+
# @return [nil]
|
164
|
+
def get_app(access_token, id, opts = {})
|
165
|
+
get_app_with_http_info(access_token, id, opts)
|
166
|
+
nil
|
167
|
+
end
|
168
|
+
|
169
|
+
# show app
|
170
|
+
# @param access_token [String]
|
171
|
+
# @param id [String] id
|
172
|
+
# @param [Hash] opts the optional parameters
|
173
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
174
|
+
def get_app_with_http_info(access_token, id, opts = {})
|
175
|
+
if @api_client.config.debugging
|
176
|
+
@api_client.config.logger.debug 'Calling API: AppsApi.get_app ...'
|
177
|
+
end
|
178
|
+
# verify the required parameter 'access_token' is set
|
179
|
+
if @api_client.config.client_side_validation && access_token.nil?
|
180
|
+
fail ArgumentError, "Missing the required parameter 'access_token' when calling AppsApi.get_app"
|
181
|
+
end
|
182
|
+
# verify the required parameter 'id' is set
|
183
|
+
if @api_client.config.client_side_validation && id.nil?
|
184
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AppsApi.get_app"
|
185
|
+
end
|
186
|
+
# resource path
|
187
|
+
local_var_path = '/api/v1/apps/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
188
|
+
|
189
|
+
# query parameters
|
190
|
+
query_params = opts[:query_params] || {}
|
191
|
+
|
192
|
+
# header parameters
|
193
|
+
header_params = opts[:header_params] || {}
|
194
|
+
# HTTP header 'Accept' (if needed)
|
195
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
196
|
+
header_params[:'access-token'] = access_token
|
197
|
+
|
198
|
+
# form parameters
|
199
|
+
form_params = opts[:form_params] || {}
|
200
|
+
|
201
|
+
# http body (model)
|
202
|
+
post_body = opts[:debug_body]
|
203
|
+
|
204
|
+
# return_type
|
205
|
+
return_type = opts[:debug_return_type]
|
206
|
+
|
207
|
+
# auth_names
|
208
|
+
auth_names = opts[:debug_auth_names] || []
|
209
|
+
|
210
|
+
new_options = opts.merge(
|
211
|
+
:operation => :"AppsApi.get_app",
|
212
|
+
:header_params => header_params,
|
213
|
+
:query_params => query_params,
|
214
|
+
:form_params => form_params,
|
215
|
+
:body => post_body,
|
216
|
+
:auth_names => auth_names,
|
217
|
+
:return_type => return_type
|
218
|
+
)
|
219
|
+
|
220
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
221
|
+
if @api_client.config.debugging
|
222
|
+
@api_client.config.logger.debug "API called: AppsApi#get_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
223
|
+
end
|
224
|
+
return data, status_code, headers
|
225
|
+
end
|
226
|
+
|
227
|
+
# list apps
|
228
|
+
# @param access_token [String]
|
229
|
+
# @param [Hash] opts the optional parameters
|
230
|
+
# @return [nil]
|
231
|
+
def get_apps(access_token, opts = {})
|
232
|
+
get_apps_with_http_info(access_token, opts)
|
233
|
+
nil
|
234
|
+
end
|
235
|
+
|
236
|
+
# list apps
|
237
|
+
# @param access_token [String]
|
238
|
+
# @param [Hash] opts the optional parameters
|
239
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
240
|
+
def get_apps_with_http_info(access_token, opts = {})
|
241
|
+
if @api_client.config.debugging
|
242
|
+
@api_client.config.logger.debug 'Calling API: AppsApi.get_apps ...'
|
243
|
+
end
|
244
|
+
# verify the required parameter 'access_token' is set
|
245
|
+
if @api_client.config.client_side_validation && access_token.nil?
|
246
|
+
fail ArgumentError, "Missing the required parameter 'access_token' when calling AppsApi.get_apps"
|
247
|
+
end
|
248
|
+
# resource path
|
249
|
+
local_var_path = '/api/v1/apps'
|
250
|
+
|
251
|
+
# query parameters
|
252
|
+
query_params = opts[:query_params] || {}
|
253
|
+
|
254
|
+
# header parameters
|
255
|
+
header_params = opts[:header_params] || {}
|
256
|
+
# HTTP header 'Accept' (if needed)
|
257
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
258
|
+
header_params[:'access-token'] = access_token
|
259
|
+
|
260
|
+
# form parameters
|
261
|
+
form_params = opts[:form_params] || {}
|
262
|
+
|
263
|
+
# http body (model)
|
264
|
+
post_body = opts[:debug_body]
|
265
|
+
|
266
|
+
# return_type
|
267
|
+
return_type = opts[:debug_return_type]
|
268
|
+
|
269
|
+
# auth_names
|
270
|
+
auth_names = opts[:debug_auth_names] || []
|
271
|
+
|
272
|
+
new_options = opts.merge(
|
273
|
+
:operation => :"AppsApi.get_apps",
|
274
|
+
:header_params => header_params,
|
275
|
+
:query_params => query_params,
|
276
|
+
:form_params => form_params,
|
277
|
+
:body => post_body,
|
278
|
+
:auth_names => auth_names,
|
279
|
+
:return_type => return_type
|
280
|
+
)
|
281
|
+
|
282
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
283
|
+
if @api_client.config.debugging
|
284
|
+
@api_client.config.logger.debug "API called: AppsApi#get_apps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
285
|
+
end
|
286
|
+
return data, status_code, headers
|
287
|
+
end
|
288
|
+
|
289
|
+
# update app
|
290
|
+
# @param access_token [String]
|
291
|
+
# @param id [String] id
|
292
|
+
# @param [Hash] opts the optional parameters
|
293
|
+
# @option opts [App] :app
|
294
|
+
# @return [nil]
|
295
|
+
def patch_app(access_token, id, opts = {})
|
296
|
+
patch_app_with_http_info(access_token, id, opts)
|
297
|
+
nil
|
298
|
+
end
|
299
|
+
|
300
|
+
# update app
|
301
|
+
# @param access_token [String]
|
302
|
+
# @param id [String] id
|
303
|
+
# @param [Hash] opts the optional parameters
|
304
|
+
# @option opts [App] :app
|
305
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
306
|
+
def patch_app_with_http_info(access_token, id, opts = {})
|
307
|
+
if @api_client.config.debugging
|
308
|
+
@api_client.config.logger.debug 'Calling API: AppsApi.patch_app ...'
|
309
|
+
end
|
310
|
+
# verify the required parameter 'access_token' is set
|
311
|
+
if @api_client.config.client_side_validation && access_token.nil?
|
312
|
+
fail ArgumentError, "Missing the required parameter 'access_token' when calling AppsApi.patch_app"
|
313
|
+
end
|
314
|
+
# verify the required parameter 'id' is set
|
315
|
+
if @api_client.config.client_side_validation && id.nil?
|
316
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AppsApi.patch_app"
|
317
|
+
end
|
318
|
+
# resource path
|
319
|
+
local_var_path = '/api/v1/apps/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
320
|
+
|
321
|
+
# query parameters
|
322
|
+
query_params = opts[:query_params] || {}
|
323
|
+
|
324
|
+
# header parameters
|
325
|
+
header_params = opts[:header_params] || {}
|
326
|
+
# HTTP header 'Accept' (if needed)
|
327
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
328
|
+
# HTTP header 'Content-Type'
|
329
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
330
|
+
if !content_type.nil?
|
331
|
+
header_params['Content-Type'] = content_type
|
332
|
+
end
|
333
|
+
header_params[:'access-token'] = access_token
|
334
|
+
|
335
|
+
# form parameters
|
336
|
+
form_params = opts[:form_params] || {}
|
337
|
+
|
338
|
+
# http body (model)
|
339
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'app'])
|
340
|
+
|
341
|
+
# return_type
|
342
|
+
return_type = opts[:debug_return_type]
|
343
|
+
|
344
|
+
# auth_names
|
345
|
+
auth_names = opts[:debug_auth_names] || []
|
346
|
+
|
347
|
+
new_options = opts.merge(
|
348
|
+
:operation => :"AppsApi.patch_app",
|
349
|
+
:header_params => header_params,
|
350
|
+
:query_params => query_params,
|
351
|
+
:form_params => form_params,
|
352
|
+
:body => post_body,
|
353
|
+
:auth_names => auth_names,
|
354
|
+
:return_type => return_type
|
355
|
+
)
|
356
|
+
|
357
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
358
|
+
if @api_client.config.debugging
|
359
|
+
@api_client.config.logger.debug "API called: AppsApi#patch_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
360
|
+
end
|
361
|
+
return data, status_code, headers
|
362
|
+
end
|
363
|
+
|
364
|
+
# update app
|
365
|
+
# @param access_token [String]
|
366
|
+
# @param id [String] id
|
367
|
+
# @param [Hash] opts the optional parameters
|
368
|
+
# @option opts [App] :app
|
369
|
+
# @return [nil]
|
370
|
+
def update_app(access_token, id, opts = {})
|
371
|
+
update_app_with_http_info(access_token, id, opts)
|
372
|
+
nil
|
373
|
+
end
|
374
|
+
|
375
|
+
# update app
|
376
|
+
# @param access_token [String]
|
377
|
+
# @param id [String] id
|
378
|
+
# @param [Hash] opts the optional parameters
|
379
|
+
# @option opts [App] :app
|
380
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
381
|
+
def update_app_with_http_info(access_token, id, opts = {})
|
382
|
+
if @api_client.config.debugging
|
383
|
+
@api_client.config.logger.debug 'Calling API: AppsApi.update_app ...'
|
384
|
+
end
|
385
|
+
# verify the required parameter 'access_token' is set
|
386
|
+
if @api_client.config.client_side_validation && access_token.nil?
|
387
|
+
fail ArgumentError, "Missing the required parameter 'access_token' when calling AppsApi.update_app"
|
388
|
+
end
|
389
|
+
# verify the required parameter 'id' is set
|
390
|
+
if @api_client.config.client_side_validation && id.nil?
|
391
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AppsApi.update_app"
|
392
|
+
end
|
393
|
+
# resource path
|
394
|
+
local_var_path = '/api/v1/apps/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
395
|
+
|
396
|
+
# query parameters
|
397
|
+
query_params = opts[:query_params] || {}
|
398
|
+
|
399
|
+
# header parameters
|
400
|
+
header_params = opts[:header_params] || {}
|
401
|
+
# HTTP header 'Accept' (if needed)
|
402
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
403
|
+
# HTTP header 'Content-Type'
|
404
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
405
|
+
if !content_type.nil?
|
406
|
+
header_params['Content-Type'] = content_type
|
407
|
+
end
|
408
|
+
header_params[:'access-token'] = access_token
|
409
|
+
|
410
|
+
# form parameters
|
411
|
+
form_params = opts[:form_params] || {}
|
412
|
+
|
413
|
+
# http body (model)
|
414
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'app'])
|
415
|
+
|
416
|
+
# return_type
|
417
|
+
return_type = opts[:debug_return_type]
|
418
|
+
|
419
|
+
# auth_names
|
420
|
+
auth_names = opts[:debug_auth_names] || []
|
421
|
+
|
422
|
+
new_options = opts.merge(
|
423
|
+
:operation => :"AppsApi.update_app",
|
424
|
+
:header_params => header_params,
|
425
|
+
:query_params => query_params,
|
426
|
+
:form_params => form_params,
|
427
|
+
:body => post_body,
|
428
|
+
:auth_names => auth_names,
|
429
|
+
:return_type => return_type
|
430
|
+
)
|
431
|
+
|
432
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
433
|
+
if @api_client.config.debugging
|
434
|
+
@api_client.config.logger.debug "API called: AppsApi#update_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
435
|
+
end
|
436
|
+
return data, status_code, headers
|
437
|
+
end
|
438
|
+
end
|
439
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
=begin
|
2
|
+
#API V1
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.12.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module OpenapiClient
|
16
|
+
class AuthApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# validates a token
|
23
|
+
# @param access_token [String]
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [AuthValidateTokenGet200Response]
|
26
|
+
def auth_validate_token_get(access_token, opts = {})
|
27
|
+
data, _status_code, _headers = auth_validate_token_get_with_http_info(access_token, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# validates a token
|
32
|
+
# @param access_token [String]
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(AuthValidateTokenGet200Response, Integer, Hash)>] AuthValidateTokenGet200Response data, response status code and response headers
|
35
|
+
def auth_validate_token_get_with_http_info(access_token, opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: AuthApi.auth_validate_token_get ...'
|
38
|
+
end
|
39
|
+
# verify the required parameter 'access_token' is set
|
40
|
+
if @api_client.config.client_side_validation && access_token.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'access_token' when calling AuthApi.auth_validate_token_get"
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/auth/validate_token'
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = opts[:header_params] || {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
53
|
+
header_params[:'access-token'] = access_token
|
54
|
+
|
55
|
+
# form parameters
|
56
|
+
form_params = opts[:form_params] || {}
|
57
|
+
|
58
|
+
# http body (model)
|
59
|
+
post_body = opts[:debug_body]
|
60
|
+
|
61
|
+
# return_type
|
62
|
+
return_type = opts[:debug_return_type] || 'AuthValidateTokenGet200Response'
|
63
|
+
|
64
|
+
# auth_names
|
65
|
+
auth_names = opts[:debug_auth_names] || []
|
66
|
+
|
67
|
+
new_options = opts.merge(
|
68
|
+
:operation => :"AuthApi.auth_validate_token_get",
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => return_type
|
75
|
+
)
|
76
|
+
|
77
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: AuthApi#auth_validate_token_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|