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
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a742e8d8188ae6641429152574de7bc12a62fe0fb867d6383e302a8deada77e8
|
4
|
+
data.tar.gz: 97574dbd9b7c937fba1dd1e7c6fea16ec84d1e1d521cf1e80cd2609ce43d5023
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 834cc3bf8475fbfc977823dc7f07f8cca31bf72e07f4f15db69e1da39852902b312effc86f8b1bf31b29f7cd858d4d708ab3f41c24904ab28d4cb31f3cfd126c
|
7
|
+
data.tar.gz: 0c902721a7819f7260e4db25ac26cff60d09dd1f2098d28c280fd08210ad257daba5bc0dcc0480cd943c49ba4f1202bf3cd4eef1153360354ce9b27ef917a6ea
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
# openapi_client
|
2
|
+
|
3
|
+
OpenapiClient - the Ruby gem for the API V1
|
4
|
+
|
5
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
6
|
+
|
7
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
|
+
|
9
|
+
- API version: v1
|
10
|
+
- Package version: 1.0.0
|
11
|
+
- Generator version: 7.12.0
|
12
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
13
|
+
|
14
|
+
## Installation
|
15
|
+
|
16
|
+
### Build a gem
|
17
|
+
|
18
|
+
To build the Ruby code into a gem:
|
19
|
+
|
20
|
+
```shell
|
21
|
+
gem build openapi_client.gemspec
|
22
|
+
```
|
23
|
+
|
24
|
+
Then either install the gem locally:
|
25
|
+
|
26
|
+
```shell
|
27
|
+
gem install ./openapi_client-1.0.0.gem
|
28
|
+
```
|
29
|
+
|
30
|
+
(for development, run `gem install --dev ./openapi_client-1.0.0.gem` to install the development dependencies)
|
31
|
+
|
32
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
33
|
+
|
34
|
+
Finally add this to the Gemfile:
|
35
|
+
|
36
|
+
gem 'openapi_client', '~> 1.0.0'
|
37
|
+
|
38
|
+
### Install from Git
|
39
|
+
|
40
|
+
If the Ruby gem is hosted at a git repository: https:///YOUR_GIT_USERNAME/YOUR_GIT_REPO, then add the following in the Gemfile:
|
41
|
+
|
42
|
+
gem 'openapi_client', :git => 'https:///YOUR_GIT_USERNAME/YOUR_GIT_REPO.git'
|
43
|
+
|
44
|
+
### Include the Ruby code directly
|
45
|
+
|
46
|
+
Include the Ruby code directly using `-I` as follows:
|
47
|
+
|
48
|
+
```shell
|
49
|
+
ruby -Ilib script.rb
|
50
|
+
```
|
51
|
+
|
52
|
+
## Getting Started
|
53
|
+
|
54
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
# Load the gem
|
58
|
+
require 'openapi_client'
|
59
|
+
|
60
|
+
api_instance = OpenapiClient::AppsApi.new
|
61
|
+
access_token = 'access_token_example' # String |
|
62
|
+
opts = {
|
63
|
+
app: OpenapiClient::App.new # App |
|
64
|
+
}
|
65
|
+
|
66
|
+
begin
|
67
|
+
#create app
|
68
|
+
api_instance.create_app(access_token, opts)
|
69
|
+
rescue OpenapiClient::ApiError => e
|
70
|
+
puts "Exception when calling AppsApi->create_app: #{e}"
|
71
|
+
end
|
72
|
+
|
73
|
+
```
|
74
|
+
|
75
|
+
## Documentation for API Endpoints
|
76
|
+
|
77
|
+
All URIs are relative to *http://127.0.0.1:3085*
|
78
|
+
|
79
|
+
Class | Method | HTTP request | Description
|
80
|
+
------------ | ------------- | ------------- | -------------
|
81
|
+
*OpenapiClient::AppsApi* | [**create_app**](docs/AppsApi.md#create_app) | **POST** /api/v1/apps | create app
|
82
|
+
*OpenapiClient::AppsApi* | [**delete_app**](docs/AppsApi.md#delete_app) | **DELETE** /api/v1/apps/{id} | delete app
|
83
|
+
*OpenapiClient::AppsApi* | [**get_app**](docs/AppsApi.md#get_app) | **GET** /api/v1/apps/{id} | show app
|
84
|
+
*OpenapiClient::AppsApi* | [**get_apps**](docs/AppsApi.md#get_apps) | **GET** /api/v1/apps | list apps
|
85
|
+
*OpenapiClient::AppsApi* | [**patch_app**](docs/AppsApi.md#patch_app) | **PATCH** /api/v1/apps/{id} | update app
|
86
|
+
*OpenapiClient::AppsApi* | [**update_app**](docs/AppsApi.md#update_app) | **PUT** /api/v1/apps/{id} | update app
|
87
|
+
*OpenapiClient::AuthApi* | [**auth_validate_token_get**](docs/AuthApi.md#auth_validate_token_get) | **GET** /auth/validate_token | validates a token
|
88
|
+
*OpenapiClient::UsersApi* | [**add_role_to_user**](docs/UsersApi.md#add_role_to_user) | **POST** /api/v1/users/{user_id}/roles | add role to user
|
89
|
+
*OpenapiClient::UsersApi* | [**delete_role_from_user**](docs/UsersApi.md#delete_role_from_user) | **DELETE** /api/v1/users/{user_id}/roles/{role_id} | delete role
|
90
|
+
*OpenapiClient::UsersApi* | [**delete_user**](docs/UsersApi.md#delete_user) | **DELETE** /api/v1/users/{id} | delete user
|
91
|
+
*OpenapiClient::UsersApi* | [**get_user**](docs/UsersApi.md#get_user) | **GET** /api/v1/users/{id} | show user
|
92
|
+
*OpenapiClient::UsersApi* | [**get_user_roles**](docs/UsersApi.md#get_user_roles) | **GET** /api/v1/users/{user_id}/roles | list roles of a user
|
93
|
+
*OpenapiClient::UsersApi* | [**get_users**](docs/UsersApi.md#get_users) | **GET** /api/v1/users | list users
|
94
|
+
*OpenapiClient::UsersApi* | [**patch_user**](docs/UsersApi.md#patch_user) | **PATCH** /api/v1/users/{id} | update user
|
95
|
+
*OpenapiClient::UsersApi* | [**update_user**](docs/UsersApi.md#update_user) | **PUT** /api/v1/users/{id} | update user
|
96
|
+
|
97
|
+
|
98
|
+
## Documentation for Models
|
99
|
+
|
100
|
+
- [OpenapiClient::App](docs/App.md)
|
101
|
+
- [OpenapiClient::AuthValidateTokenGet200Response](docs/AuthValidateTokenGet200Response.md)
|
102
|
+
- [OpenapiClient::Role](docs/Role.md)
|
103
|
+
- [OpenapiClient::User](docs/User.md)
|
104
|
+
- [OpenapiClient::UserAppAdd](docs/UserAppAdd.md)
|
105
|
+
- [OpenapiClient::UserRoleAdd](docs/UserRoleAdd.md)
|
106
|
+
|
107
|
+
|
108
|
+
## Documentation for Authorization
|
109
|
+
|
110
|
+
Endpoints do not require authorization.
|
111
|
+
|
data/Rakefile
ADDED
data/docs/App.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# OpenapiClient::App
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | [optional] |
|
8
|
+
| **url** | **String** | | [optional] |
|
9
|
+
| **label** | **String** | | [optional] |
|
10
|
+
| **description** | **String** | | [optional] |
|
11
|
+
| **status** | **String** | | [optional] |
|
12
|
+
| **category** | **String** | | [optional] |
|
13
|
+
| **logo** | **String** | | [optional] |
|
14
|
+
| **catalog** | **Boolean** | | [optional] |
|
15
|
+
|
16
|
+
## Example
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'openapi_client'
|
20
|
+
|
21
|
+
instance = OpenapiClient::App.new(
|
22
|
+
name: My App,
|
23
|
+
url: https://www.example.com,
|
24
|
+
label: App label,
|
25
|
+
description: Short app info,
|
26
|
+
status: available,
|
27
|
+
category: administration,
|
28
|
+
logo: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA...,
|
29
|
+
catalog: true
|
30
|
+
)
|
31
|
+
```
|
32
|
+
|
data/docs/AppsApi.md
ADDED
@@ -0,0 +1,399 @@
|
|
1
|
+
# OpenapiClient::AppsApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://127.0.0.1:3085*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**create_app**](AppsApi.md#create_app) | **POST** /api/v1/apps | create app |
|
8
|
+
| [**delete_app**](AppsApi.md#delete_app) | **DELETE** /api/v1/apps/{id} | delete app |
|
9
|
+
| [**get_app**](AppsApi.md#get_app) | **GET** /api/v1/apps/{id} | show app |
|
10
|
+
| [**get_apps**](AppsApi.md#get_apps) | **GET** /api/v1/apps | list apps |
|
11
|
+
| [**patch_app**](AppsApi.md#patch_app) | **PATCH** /api/v1/apps/{id} | update app |
|
12
|
+
| [**update_app**](AppsApi.md#update_app) | **PUT** /api/v1/apps/{id} | update app |
|
13
|
+
|
14
|
+
|
15
|
+
## create_app
|
16
|
+
|
17
|
+
> create_app(access_token, opts)
|
18
|
+
|
19
|
+
create app
|
20
|
+
|
21
|
+
### Examples
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'time'
|
25
|
+
require 'openapi_client'
|
26
|
+
|
27
|
+
api_instance = OpenapiClient::AppsApi.new
|
28
|
+
access_token = 'access_token_example' # String |
|
29
|
+
opts = {
|
30
|
+
app: OpenapiClient::App.new # App |
|
31
|
+
}
|
32
|
+
|
33
|
+
begin
|
34
|
+
# create app
|
35
|
+
api_instance.create_app(access_token, opts)
|
36
|
+
rescue OpenapiClient::ApiError => e
|
37
|
+
puts "Error when calling AppsApi->create_app: #{e}"
|
38
|
+
end
|
39
|
+
```
|
40
|
+
|
41
|
+
#### Using the create_app_with_http_info variant
|
42
|
+
|
43
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
44
|
+
|
45
|
+
> <Array(nil, Integer, Hash)> create_app_with_http_info(access_token, opts)
|
46
|
+
|
47
|
+
```ruby
|
48
|
+
begin
|
49
|
+
# create app
|
50
|
+
data, status_code, headers = api_instance.create_app_with_http_info(access_token, opts)
|
51
|
+
p status_code # => 2xx
|
52
|
+
p headers # => { ... }
|
53
|
+
p data # => nil
|
54
|
+
rescue OpenapiClient::ApiError => e
|
55
|
+
puts "Error when calling AppsApi->create_app_with_http_info: #{e}"
|
56
|
+
end
|
57
|
+
```
|
58
|
+
|
59
|
+
### Parameters
|
60
|
+
|
61
|
+
| Name | Type | Description | Notes |
|
62
|
+
| ---- | ---- | ----------- | ----- |
|
63
|
+
| **access_token** | **String** | | |
|
64
|
+
| **app** | [**App**](App.md) | | [optional] |
|
65
|
+
|
66
|
+
### Return type
|
67
|
+
|
68
|
+
nil (empty response body)
|
69
|
+
|
70
|
+
### Authorization
|
71
|
+
|
72
|
+
No authorization required
|
73
|
+
|
74
|
+
### HTTP request headers
|
75
|
+
|
76
|
+
- **Content-Type**: application/json
|
77
|
+
- **Accept**: application/json
|
78
|
+
|
79
|
+
|
80
|
+
## delete_app
|
81
|
+
|
82
|
+
> delete_app(access_token, id)
|
83
|
+
|
84
|
+
delete app
|
85
|
+
|
86
|
+
### Examples
|
87
|
+
|
88
|
+
```ruby
|
89
|
+
require 'time'
|
90
|
+
require 'openapi_client'
|
91
|
+
|
92
|
+
api_instance = OpenapiClient::AppsApi.new
|
93
|
+
access_token = 'access_token_example' # String |
|
94
|
+
id = 'id_example' # String | id
|
95
|
+
|
96
|
+
begin
|
97
|
+
# delete app
|
98
|
+
api_instance.delete_app(access_token, id)
|
99
|
+
rescue OpenapiClient::ApiError => e
|
100
|
+
puts "Error when calling AppsApi->delete_app: #{e}"
|
101
|
+
end
|
102
|
+
```
|
103
|
+
|
104
|
+
#### Using the delete_app_with_http_info variant
|
105
|
+
|
106
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
107
|
+
|
108
|
+
> <Array(nil, Integer, Hash)> delete_app_with_http_info(access_token, id)
|
109
|
+
|
110
|
+
```ruby
|
111
|
+
begin
|
112
|
+
# delete app
|
113
|
+
data, status_code, headers = api_instance.delete_app_with_http_info(access_token, id)
|
114
|
+
p status_code # => 2xx
|
115
|
+
p headers # => { ... }
|
116
|
+
p data # => nil
|
117
|
+
rescue OpenapiClient::ApiError => e
|
118
|
+
puts "Error when calling AppsApi->delete_app_with_http_info: #{e}"
|
119
|
+
end
|
120
|
+
```
|
121
|
+
|
122
|
+
### Parameters
|
123
|
+
|
124
|
+
| Name | Type | Description | Notes |
|
125
|
+
| ---- | ---- | ----------- | ----- |
|
126
|
+
| **access_token** | **String** | | |
|
127
|
+
| **id** | **String** | id | |
|
128
|
+
|
129
|
+
### Return type
|
130
|
+
|
131
|
+
nil (empty response body)
|
132
|
+
|
133
|
+
### Authorization
|
134
|
+
|
135
|
+
No authorization required
|
136
|
+
|
137
|
+
### HTTP request headers
|
138
|
+
|
139
|
+
- **Content-Type**: Not defined
|
140
|
+
- **Accept**: application/json
|
141
|
+
|
142
|
+
|
143
|
+
## get_app
|
144
|
+
|
145
|
+
> get_app(access_token, id)
|
146
|
+
|
147
|
+
show app
|
148
|
+
|
149
|
+
### Examples
|
150
|
+
|
151
|
+
```ruby
|
152
|
+
require 'time'
|
153
|
+
require 'openapi_client'
|
154
|
+
|
155
|
+
api_instance = OpenapiClient::AppsApi.new
|
156
|
+
access_token = 'access_token_example' # String |
|
157
|
+
id = 'id_example' # String | id
|
158
|
+
|
159
|
+
begin
|
160
|
+
# show app
|
161
|
+
api_instance.get_app(access_token, id)
|
162
|
+
rescue OpenapiClient::ApiError => e
|
163
|
+
puts "Error when calling AppsApi->get_app: #{e}"
|
164
|
+
end
|
165
|
+
```
|
166
|
+
|
167
|
+
#### Using the get_app_with_http_info variant
|
168
|
+
|
169
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
170
|
+
|
171
|
+
> <Array(nil, Integer, Hash)> get_app_with_http_info(access_token, id)
|
172
|
+
|
173
|
+
```ruby
|
174
|
+
begin
|
175
|
+
# show app
|
176
|
+
data, status_code, headers = api_instance.get_app_with_http_info(access_token, id)
|
177
|
+
p status_code # => 2xx
|
178
|
+
p headers # => { ... }
|
179
|
+
p data # => nil
|
180
|
+
rescue OpenapiClient::ApiError => e
|
181
|
+
puts "Error when calling AppsApi->get_app_with_http_info: #{e}"
|
182
|
+
end
|
183
|
+
```
|
184
|
+
|
185
|
+
### Parameters
|
186
|
+
|
187
|
+
| Name | Type | Description | Notes |
|
188
|
+
| ---- | ---- | ----------- | ----- |
|
189
|
+
| **access_token** | **String** | | |
|
190
|
+
| **id** | **String** | id | |
|
191
|
+
|
192
|
+
### Return type
|
193
|
+
|
194
|
+
nil (empty response body)
|
195
|
+
|
196
|
+
### Authorization
|
197
|
+
|
198
|
+
No authorization required
|
199
|
+
|
200
|
+
### HTTP request headers
|
201
|
+
|
202
|
+
- **Content-Type**: Not defined
|
203
|
+
- **Accept**: application/json
|
204
|
+
|
205
|
+
|
206
|
+
## get_apps
|
207
|
+
|
208
|
+
> get_apps(access_token)
|
209
|
+
|
210
|
+
list apps
|
211
|
+
|
212
|
+
### Examples
|
213
|
+
|
214
|
+
```ruby
|
215
|
+
require 'time'
|
216
|
+
require 'openapi_client'
|
217
|
+
|
218
|
+
api_instance = OpenapiClient::AppsApi.new
|
219
|
+
access_token = 'access_token_example' # String |
|
220
|
+
|
221
|
+
begin
|
222
|
+
# list apps
|
223
|
+
api_instance.get_apps(access_token)
|
224
|
+
rescue OpenapiClient::ApiError => e
|
225
|
+
puts "Error when calling AppsApi->get_apps: #{e}"
|
226
|
+
end
|
227
|
+
```
|
228
|
+
|
229
|
+
#### Using the get_apps_with_http_info variant
|
230
|
+
|
231
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
232
|
+
|
233
|
+
> <Array(nil, Integer, Hash)> get_apps_with_http_info(access_token)
|
234
|
+
|
235
|
+
```ruby
|
236
|
+
begin
|
237
|
+
# list apps
|
238
|
+
data, status_code, headers = api_instance.get_apps_with_http_info(access_token)
|
239
|
+
p status_code # => 2xx
|
240
|
+
p headers # => { ... }
|
241
|
+
p data # => nil
|
242
|
+
rescue OpenapiClient::ApiError => e
|
243
|
+
puts "Error when calling AppsApi->get_apps_with_http_info: #{e}"
|
244
|
+
end
|
245
|
+
```
|
246
|
+
|
247
|
+
### Parameters
|
248
|
+
|
249
|
+
| Name | Type | Description | Notes |
|
250
|
+
| ---- | ---- | ----------- | ----- |
|
251
|
+
| **access_token** | **String** | | |
|
252
|
+
|
253
|
+
### Return type
|
254
|
+
|
255
|
+
nil (empty response body)
|
256
|
+
|
257
|
+
### Authorization
|
258
|
+
|
259
|
+
No authorization required
|
260
|
+
|
261
|
+
### HTTP request headers
|
262
|
+
|
263
|
+
- **Content-Type**: Not defined
|
264
|
+
- **Accept**: application/json
|
265
|
+
|
266
|
+
|
267
|
+
## patch_app
|
268
|
+
|
269
|
+
> patch_app(access_token, id, opts)
|
270
|
+
|
271
|
+
update app
|
272
|
+
|
273
|
+
### Examples
|
274
|
+
|
275
|
+
```ruby
|
276
|
+
require 'time'
|
277
|
+
require 'openapi_client'
|
278
|
+
|
279
|
+
api_instance = OpenapiClient::AppsApi.new
|
280
|
+
access_token = 'access_token_example' # String |
|
281
|
+
id = 'id_example' # String | id
|
282
|
+
opts = {
|
283
|
+
app: OpenapiClient::App.new # App |
|
284
|
+
}
|
285
|
+
|
286
|
+
begin
|
287
|
+
# update app
|
288
|
+
api_instance.patch_app(access_token, id, opts)
|
289
|
+
rescue OpenapiClient::ApiError => e
|
290
|
+
puts "Error when calling AppsApi->patch_app: #{e}"
|
291
|
+
end
|
292
|
+
```
|
293
|
+
|
294
|
+
#### Using the patch_app_with_http_info variant
|
295
|
+
|
296
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
297
|
+
|
298
|
+
> <Array(nil, Integer, Hash)> patch_app_with_http_info(access_token, id, opts)
|
299
|
+
|
300
|
+
```ruby
|
301
|
+
begin
|
302
|
+
# update app
|
303
|
+
data, status_code, headers = api_instance.patch_app_with_http_info(access_token, id, opts)
|
304
|
+
p status_code # => 2xx
|
305
|
+
p headers # => { ... }
|
306
|
+
p data # => nil
|
307
|
+
rescue OpenapiClient::ApiError => e
|
308
|
+
puts "Error when calling AppsApi->patch_app_with_http_info: #{e}"
|
309
|
+
end
|
310
|
+
```
|
311
|
+
|
312
|
+
### Parameters
|
313
|
+
|
314
|
+
| Name | Type | Description | Notes |
|
315
|
+
| ---- | ---- | ----------- | ----- |
|
316
|
+
| **access_token** | **String** | | |
|
317
|
+
| **id** | **String** | id | |
|
318
|
+
| **app** | [**App**](App.md) | | [optional] |
|
319
|
+
|
320
|
+
### Return type
|
321
|
+
|
322
|
+
nil (empty response body)
|
323
|
+
|
324
|
+
### Authorization
|
325
|
+
|
326
|
+
No authorization required
|
327
|
+
|
328
|
+
### HTTP request headers
|
329
|
+
|
330
|
+
- **Content-Type**: application/json
|
331
|
+
- **Accept**: application/json
|
332
|
+
|
333
|
+
|
334
|
+
## update_app
|
335
|
+
|
336
|
+
> update_app(access_token, id, opts)
|
337
|
+
|
338
|
+
update app
|
339
|
+
|
340
|
+
### Examples
|
341
|
+
|
342
|
+
```ruby
|
343
|
+
require 'time'
|
344
|
+
require 'openapi_client'
|
345
|
+
|
346
|
+
api_instance = OpenapiClient::AppsApi.new
|
347
|
+
access_token = 'access_token_example' # String |
|
348
|
+
id = 'id_example' # String | id
|
349
|
+
opts = {
|
350
|
+
app: OpenapiClient::App.new # App |
|
351
|
+
}
|
352
|
+
|
353
|
+
begin
|
354
|
+
# update app
|
355
|
+
api_instance.update_app(access_token, id, opts)
|
356
|
+
rescue OpenapiClient::ApiError => e
|
357
|
+
puts "Error when calling AppsApi->update_app: #{e}"
|
358
|
+
end
|
359
|
+
```
|
360
|
+
|
361
|
+
#### Using the update_app_with_http_info variant
|
362
|
+
|
363
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
364
|
+
|
365
|
+
> <Array(nil, Integer, Hash)> update_app_with_http_info(access_token, id, opts)
|
366
|
+
|
367
|
+
```ruby
|
368
|
+
begin
|
369
|
+
# update app
|
370
|
+
data, status_code, headers = api_instance.update_app_with_http_info(access_token, id, opts)
|
371
|
+
p status_code # => 2xx
|
372
|
+
p headers # => { ... }
|
373
|
+
p data # => nil
|
374
|
+
rescue OpenapiClient::ApiError => e
|
375
|
+
puts "Error when calling AppsApi->update_app_with_http_info: #{e}"
|
376
|
+
end
|
377
|
+
```
|
378
|
+
|
379
|
+
### Parameters
|
380
|
+
|
381
|
+
| Name | Type | Description | Notes |
|
382
|
+
| ---- | ---- | ----------- | ----- |
|
383
|
+
| **access_token** | **String** | | |
|
384
|
+
| **id** | **String** | id | |
|
385
|
+
| **app** | [**App**](App.md) | | [optional] |
|
386
|
+
|
387
|
+
### Return type
|
388
|
+
|
389
|
+
nil (empty response body)
|
390
|
+
|
391
|
+
### Authorization
|
392
|
+
|
393
|
+
No authorization required
|
394
|
+
|
395
|
+
### HTTP request headers
|
396
|
+
|
397
|
+
- **Content-Type**: application/json
|
398
|
+
- **Accept**: application/json
|
399
|
+
|
data/docs/AuthApi.md
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
# OpenapiClient::AuthApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://127.0.0.1:3085*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**auth_validate_token_get**](AuthApi.md#auth_validate_token_get) | **GET** /auth/validate_token | validates a token |
|
8
|
+
|
9
|
+
|
10
|
+
## auth_validate_token_get
|
11
|
+
|
12
|
+
> <AuthValidateTokenGet200Response> auth_validate_token_get(access_token)
|
13
|
+
|
14
|
+
validates a token
|
15
|
+
|
16
|
+
### Examples
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'time'
|
20
|
+
require 'openapi_client'
|
21
|
+
|
22
|
+
api_instance = OpenapiClient::AuthApi.new
|
23
|
+
access_token = 'access_token_example' # String |
|
24
|
+
|
25
|
+
begin
|
26
|
+
# validates a token
|
27
|
+
result = api_instance.auth_validate_token_get(access_token)
|
28
|
+
p result
|
29
|
+
rescue OpenapiClient::ApiError => e
|
30
|
+
puts "Error when calling AuthApi->auth_validate_token_get: #{e}"
|
31
|
+
end
|
32
|
+
```
|
33
|
+
|
34
|
+
#### Using the auth_validate_token_get_with_http_info variant
|
35
|
+
|
36
|
+
This returns an Array which contains the response data, status code and headers.
|
37
|
+
|
38
|
+
> <Array(<AuthValidateTokenGet200Response>, Integer, Hash)> auth_validate_token_get_with_http_info(access_token)
|
39
|
+
|
40
|
+
```ruby
|
41
|
+
begin
|
42
|
+
# validates a token
|
43
|
+
data, status_code, headers = api_instance.auth_validate_token_get_with_http_info(access_token)
|
44
|
+
p status_code # => 2xx
|
45
|
+
p headers # => { ... }
|
46
|
+
p data # => <AuthValidateTokenGet200Response>
|
47
|
+
rescue OpenapiClient::ApiError => e
|
48
|
+
puts "Error when calling AuthApi->auth_validate_token_get_with_http_info: #{e}"
|
49
|
+
end
|
50
|
+
```
|
51
|
+
|
52
|
+
### Parameters
|
53
|
+
|
54
|
+
| Name | Type | Description | Notes |
|
55
|
+
| ---- | ---- | ----------- | ----- |
|
56
|
+
| **access_token** | **String** | | |
|
57
|
+
|
58
|
+
### Return type
|
59
|
+
|
60
|
+
[**AuthValidateTokenGet200Response**](AuthValidateTokenGet200Response.md)
|
61
|
+
|
62
|
+
### Authorization
|
63
|
+
|
64
|
+
No authorization required
|
65
|
+
|
66
|
+
### HTTP request headers
|
67
|
+
|
68
|
+
- **Content-Type**: Not defined
|
69
|
+
- **Accept**: application/json
|
70
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# OpenapiClient::AuthValidateTokenGet200Response
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **success** | **Boolean** | | [optional] |
|
8
|
+
| **user** | [**User**](User.md) | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'openapi_client'
|
14
|
+
|
15
|
+
instance = OpenapiClient::AuthValidateTokenGet200Response.new(
|
16
|
+
success: null,
|
17
|
+
user: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/Role.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# OpenapiClient::Role
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **Integer** | | [optional] |
|
8
|
+
| **app_id** | **Integer** | | [optional] |
|
9
|
+
| **related_role_id** | **Integer** | | [optional] |
|
10
|
+
| **related_user_id** | **Integer** | | [optional] |
|
11
|
+
| **role_id** | **Integer** | | [optional] |
|
12
|
+
| **user_id** | **Integer** | | [optional] |
|
13
|
+
| **role** | **String** | | [optional] |
|
14
|
+
| **app** | **Object** | | [optional] |
|
15
|
+
| **related_role** | **Object** | | [optional] |
|
16
|
+
|
17
|
+
## Example
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'openapi_client'
|
21
|
+
|
22
|
+
instance = OpenapiClient::Role.new(
|
23
|
+
id: 12,
|
24
|
+
app_id: null,
|
25
|
+
related_role_id: null,
|
26
|
+
related_user_id: null,
|
27
|
+
role_id: 2,
|
28
|
+
user_id: 2,
|
29
|
+
role: APP_CREATE,
|
30
|
+
app: null,
|
31
|
+
related_role: null
|
32
|
+
)
|
33
|
+
```
|
34
|
+
|