spartera_api_sdk 1.0.58
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 +11 -0
- data/Gemfile.lock +69 -0
- data/LICENSE +21 -0
- data/README.md +360 -0
- data/Rakefile +10 -0
- data/config.json +10 -0
- data/docs/APIKeysApi.md +353 -0
- data/docs/Alert.md +36 -0
- data/docs/AlertsApi.md +511 -0
- data/docs/Apikey.md +36 -0
- data/docs/Asset.md +110 -0
- data/docs/AssetPriceHistoryApi.md +573 -0
- data/docs/Assetpricehistory.md +38 -0
- data/docs/AssetsApi.md +1131 -0
- data/docs/CloudProvidersApi.md +341 -0
- data/docs/Cloudprovider.md +30 -0
- data/docs/CompaniesApi.md +619 -0
- data/docs/Company.md +44 -0
- data/docs/Connection.md +54 -0
- data/docs/ConnectionsApi.md +497 -0
- data/docs/Error.md +24 -0
- data/docs/Favorite.md +36 -0
- data/docs/FavoritesApi.md +581 -0
- data/docs/InlineObject.md +22 -0
- data/docs/InlineObject1.md +20 -0
- data/docs/InlineObject2.md +20 -0
- data/docs/InlineObject3.md +20 -0
- data/docs/User.md +34 -0
- data/docs/UsersApi.md +357 -0
- data/example.rb +51 -0
- data/git_push.sh +57 -0
- data/lib/spartera_api_sdk/api/alerts_api.rb +543 -0
- data/lib/spartera_api_sdk/api/api_keys_api.rb +345 -0
- data/lib/spartera_api_sdk/api/asset_price_history_api.rb +576 -0
- data/lib/spartera_api_sdk/api/assets_api.rb +1106 -0
- data/lib/spartera_api_sdk/api/cloud_providers_api.rb +315 -0
- data/lib/spartera_api_sdk/api/companies_api.rb +571 -0
- data/lib/spartera_api_sdk/api/connections_api.rb +501 -0
- data/lib/spartera_api_sdk/api/favorites_api.rb +610 -0
- data/lib/spartera_api_sdk/api/users_api.rb +367 -0
- data/lib/spartera_api_sdk/api_client.rb +393 -0
- data/lib/spartera_api_sdk/api_error.rb +58 -0
- data/lib/spartera_api_sdk/configuration.rb +320 -0
- data/lib/spartera_api_sdk/models/alert.rb +353 -0
- data/lib/spartera_api_sdk/models/apikey.rb +370 -0
- data/lib/spartera_api_sdk/models/asset.rb +686 -0
- data/lib/spartera_api_sdk/models/assetpricehistory.rb +345 -0
- data/lib/spartera_api_sdk/models/cloudprovider.rb +292 -0
- data/lib/spartera_api_sdk/models/company.rb +389 -0
- data/lib/spartera_api_sdk/models/connection.rb +434 -0
- data/lib/spartera_api_sdk/models/error.rb +285 -0
- data/lib/spartera_api_sdk/models/favorite.rb +353 -0
- data/lib/spartera_api_sdk/models/inline_object.rb +240 -0
- data/lib/spartera_api_sdk/models/inline_object1.rb +229 -0
- data/lib/spartera_api_sdk/models/inline_object2.rb +229 -0
- data/lib/spartera_api_sdk/models/inline_object3.rb +229 -0
- data/lib/spartera_api_sdk/models/user.rb +327 -0
- data/lib/spartera_api_sdk/version.rb +15 -0
- data/lib/spartera_api_sdk.rb +62 -0
- data/spartera_api_sdk.gemspec +28 -0
- data/spec/api/alerts_api_spec.rb +126 -0
- data/spec/api/api_keys_api_spec.rb +93 -0
- data/spec/api/asset_price_history_api_spec.rb +134 -0
- data/spec/api/assets_api_spec.rb +228 -0
- data/spec/api/cloud_providers_api_spec.rb +88 -0
- data/spec/api/companies_api_spec.rb +134 -0
- data/spec/api/connections_api_spec.rb +119 -0
- data/spec/api/favorites_api_spec.rb +138 -0
- data/spec/api/users_api_spec.rb +95 -0
- data/spec/models/alert_spec.rb +90 -0
- data/spec/models/apikey_spec.rb +90 -0
- data/spec/models/asset_spec.rb +312 -0
- data/spec/models/assetpricehistory_spec.rb +96 -0
- data/spec/models/cloudprovider_spec.rb +72 -0
- data/spec/models/company_spec.rb +114 -0
- data/spec/models/connection_spec.rb +144 -0
- data/spec/models/error_spec.rb +54 -0
- data/spec/models/favorite_spec.rb +90 -0
- data/spec/models/inline_object1_spec.rb +42 -0
- data/spec/models/inline_object2_spec.rb +42 -0
- data/spec/models/inline_object3_spec.rb +42 -0
- data/spec/models/inline_object_spec.rb +48 -0
- data/spec/models/user_spec.rb +84 -0
- data/spec/spec_helper.rb +111 -0
- data/test.sh +42 -0
- metadata +204 -0
@@ -0,0 +1,581 @@
|
|
1
|
+
# SparteraApiSdk::FavoritesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.spartera.com*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**companies_company_id_users_user_id_favorites_category_category_get**](FavoritesApi.md#companies_company_id_users_user_id_favorites_category_category_get) | **GET** /companies/{company_id}/users/{user_id}/favorites/category/{category} | Get all favorites for the specified user in a specific category |
|
8
|
+
| [**companies_company_id_users_user_id_favorites_check_asset_id_get**](FavoritesApi.md#companies_company_id_users_user_id_favorites_check_asset_id_get) | **GET** /companies/{company_id}/users/{user_id}/favorites/check/{asset_id} | Check if the specified user has favorited a specific asset Returns the favorite record if it exists, or empty result if not Useful for UI to show/hide favorite button states |
|
9
|
+
| [**companies_company_id_users_user_id_favorites_favorite_id_delete**](FavoritesApi.md#companies_company_id_users_user_id_favorites_favorite_id_delete) | **DELETE** /companies/{company_id}/users/{user_id}/favorites/{favorite_id} | Delete single favorite by ID (unfavorite an asset) |
|
10
|
+
| [**companies_company_id_users_user_id_favorites_favorite_id_get**](FavoritesApi.md#companies_company_id_users_user_id_favorites_favorite_id_get) | **GET** /companies/{company_id}/users/{user_id}/favorites/{favorite_id} | Get single favorite by ID |
|
11
|
+
| [**companies_company_id_users_user_id_favorites_favorite_id_patch**](FavoritesApi.md#companies_company_id_users_user_id_favorites_favorite_id_patch) | **PATCH** /companies/{company_id}/users/{user_id}/favorites/{favorite_id} | Update an existing favorite by ID Can update notes, category, priority |
|
12
|
+
| [**companies_company_id_users_user_id_favorites_get**](FavoritesApi.md#companies_company_id_users_user_id_favorites_get) | **GET** /companies/{company_id}/users/{user_id}/favorites | Get a list of all favorites for a specific user Query params: - category: filter by category - sort: sort field (priority, date_created, etc.) - order: sort direction (asc, desc) |
|
13
|
+
| [**companies_company_id_users_user_id_favorites_post**](FavoritesApi.md#companies_company_id_users_user_id_favorites_post) | **POST** /companies/{company_id}/users/{user_id}/favorites | POST /companies/{company_id}/users/{user_id}/favorites |
|
14
|
+
| [**companies_company_id_users_user_id_favorites_uncategorized_get**](FavoritesApi.md#companies_company_id_users_user_id_favorites_uncategorized_get) | **GET** /companies/{company_id}/users/{user_id}/favorites/uncategorized | Get all favorites for the specified user that don't have a category |
|
15
|
+
|
16
|
+
|
17
|
+
## companies_company_id_users_user_id_favorites_category_category_get
|
18
|
+
|
19
|
+
> Object companies_company_id_users_user_id_favorites_category_category_get(company_id, user_id, category)
|
20
|
+
|
21
|
+
Get all favorites for the specified user in a specific category
|
22
|
+
|
23
|
+
### Examples
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require 'time'
|
27
|
+
require 'spartera_api_sdk'
|
28
|
+
# setup authorization
|
29
|
+
SparteraApiSdk.configure do |config|
|
30
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
31
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
32
|
+
end
|
33
|
+
|
34
|
+
api_instance = SparteraApiSdk::FavoritesApi.new
|
35
|
+
company_id = 'company_id_example' # String |
|
36
|
+
user_id = 'user_id_example' # String |
|
37
|
+
category = 'category_example' # String |
|
38
|
+
|
39
|
+
begin
|
40
|
+
# Get all favorites for the specified user in a specific category
|
41
|
+
result = api_instance.companies_company_id_users_user_id_favorites_category_category_get(company_id, user_id, category)
|
42
|
+
p result
|
43
|
+
rescue SparteraApiSdk::ApiError => e
|
44
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_category_category_get: #{e}"
|
45
|
+
end
|
46
|
+
```
|
47
|
+
|
48
|
+
#### Using the companies_company_id_users_user_id_favorites_category_category_get_with_http_info variant
|
49
|
+
|
50
|
+
This returns an Array which contains the response data, status code and headers.
|
51
|
+
|
52
|
+
> <Array(Object, Integer, Hash)> companies_company_id_users_user_id_favorites_category_category_get_with_http_info(company_id, user_id, category)
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
begin
|
56
|
+
# Get all favorites for the specified user in a specific category
|
57
|
+
data, status_code, headers = api_instance.companies_company_id_users_user_id_favorites_category_category_get_with_http_info(company_id, user_id, category)
|
58
|
+
p status_code # => 2xx
|
59
|
+
p headers # => { ... }
|
60
|
+
p data # => Object
|
61
|
+
rescue SparteraApiSdk::ApiError => e
|
62
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_category_category_get_with_http_info: #{e}"
|
63
|
+
end
|
64
|
+
```
|
65
|
+
|
66
|
+
### Parameters
|
67
|
+
|
68
|
+
| Name | Type | Description | Notes |
|
69
|
+
| ---- | ---- | ----------- | ----- |
|
70
|
+
| **company_id** | **String** | | |
|
71
|
+
| **user_id** | **String** | | |
|
72
|
+
| **category** | **String** | | |
|
73
|
+
|
74
|
+
### Return type
|
75
|
+
|
76
|
+
**Object**
|
77
|
+
|
78
|
+
### Authorization
|
79
|
+
|
80
|
+
[bearerAuth](../README.md#bearerAuth)
|
81
|
+
|
82
|
+
### HTTP request headers
|
83
|
+
|
84
|
+
- **Content-Type**: Not defined
|
85
|
+
- **Accept**: application/json
|
86
|
+
|
87
|
+
|
88
|
+
## companies_company_id_users_user_id_favorites_check_asset_id_get
|
89
|
+
|
90
|
+
> Object companies_company_id_users_user_id_favorites_check_asset_id_get(company_id, user_id, asset_id)
|
91
|
+
|
92
|
+
Check if the specified user has favorited a specific asset Returns the favorite record if it exists, or empty result if not Useful for UI to show/hide favorite button states
|
93
|
+
|
94
|
+
### Examples
|
95
|
+
|
96
|
+
```ruby
|
97
|
+
require 'time'
|
98
|
+
require 'spartera_api_sdk'
|
99
|
+
# setup authorization
|
100
|
+
SparteraApiSdk.configure do |config|
|
101
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
102
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
103
|
+
end
|
104
|
+
|
105
|
+
api_instance = SparteraApiSdk::FavoritesApi.new
|
106
|
+
company_id = 'company_id_example' # String |
|
107
|
+
user_id = 'user_id_example' # String |
|
108
|
+
asset_id = 'asset_id_example' # String |
|
109
|
+
|
110
|
+
begin
|
111
|
+
# Check if the specified user has favorited a specific asset Returns the favorite record if it exists, or empty result if not Useful for UI to show/hide favorite button states
|
112
|
+
result = api_instance.companies_company_id_users_user_id_favorites_check_asset_id_get(company_id, user_id, asset_id)
|
113
|
+
p result
|
114
|
+
rescue SparteraApiSdk::ApiError => e
|
115
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_check_asset_id_get: #{e}"
|
116
|
+
end
|
117
|
+
```
|
118
|
+
|
119
|
+
#### Using the companies_company_id_users_user_id_favorites_check_asset_id_get_with_http_info variant
|
120
|
+
|
121
|
+
This returns an Array which contains the response data, status code and headers.
|
122
|
+
|
123
|
+
> <Array(Object, Integer, Hash)> companies_company_id_users_user_id_favorites_check_asset_id_get_with_http_info(company_id, user_id, asset_id)
|
124
|
+
|
125
|
+
```ruby
|
126
|
+
begin
|
127
|
+
# Check if the specified user has favorited a specific asset Returns the favorite record if it exists, or empty result if not Useful for UI to show/hide favorite button states
|
128
|
+
data, status_code, headers = api_instance.companies_company_id_users_user_id_favorites_check_asset_id_get_with_http_info(company_id, user_id, asset_id)
|
129
|
+
p status_code # => 2xx
|
130
|
+
p headers # => { ... }
|
131
|
+
p data # => Object
|
132
|
+
rescue SparteraApiSdk::ApiError => e
|
133
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_check_asset_id_get_with_http_info: #{e}"
|
134
|
+
end
|
135
|
+
```
|
136
|
+
|
137
|
+
### Parameters
|
138
|
+
|
139
|
+
| Name | Type | Description | Notes |
|
140
|
+
| ---- | ---- | ----------- | ----- |
|
141
|
+
| **company_id** | **String** | | |
|
142
|
+
| **user_id** | **String** | | |
|
143
|
+
| **asset_id** | **String** | | |
|
144
|
+
|
145
|
+
### Return type
|
146
|
+
|
147
|
+
**Object**
|
148
|
+
|
149
|
+
### Authorization
|
150
|
+
|
151
|
+
[bearerAuth](../README.md#bearerAuth)
|
152
|
+
|
153
|
+
### HTTP request headers
|
154
|
+
|
155
|
+
- **Content-Type**: Not defined
|
156
|
+
- **Accept**: application/json
|
157
|
+
|
158
|
+
|
159
|
+
## companies_company_id_users_user_id_favorites_favorite_id_delete
|
160
|
+
|
161
|
+
> Object companies_company_id_users_user_id_favorites_favorite_id_delete(company_id, user_id, favorite_id)
|
162
|
+
|
163
|
+
Delete single favorite by ID (unfavorite an asset)
|
164
|
+
|
165
|
+
### Examples
|
166
|
+
|
167
|
+
```ruby
|
168
|
+
require 'time'
|
169
|
+
require 'spartera_api_sdk'
|
170
|
+
# setup authorization
|
171
|
+
SparteraApiSdk.configure do |config|
|
172
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
173
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
174
|
+
end
|
175
|
+
|
176
|
+
api_instance = SparteraApiSdk::FavoritesApi.new
|
177
|
+
company_id = 'company_id_example' # String |
|
178
|
+
user_id = 'user_id_example' # String |
|
179
|
+
favorite_id = 'favorite_id_example' # String |
|
180
|
+
|
181
|
+
begin
|
182
|
+
# Delete single favorite by ID (unfavorite an asset)
|
183
|
+
result = api_instance.companies_company_id_users_user_id_favorites_favorite_id_delete(company_id, user_id, favorite_id)
|
184
|
+
p result
|
185
|
+
rescue SparteraApiSdk::ApiError => e
|
186
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_favorite_id_delete: #{e}"
|
187
|
+
end
|
188
|
+
```
|
189
|
+
|
190
|
+
#### Using the companies_company_id_users_user_id_favorites_favorite_id_delete_with_http_info variant
|
191
|
+
|
192
|
+
This returns an Array which contains the response data, status code and headers.
|
193
|
+
|
194
|
+
> <Array(Object, Integer, Hash)> companies_company_id_users_user_id_favorites_favorite_id_delete_with_http_info(company_id, user_id, favorite_id)
|
195
|
+
|
196
|
+
```ruby
|
197
|
+
begin
|
198
|
+
# Delete single favorite by ID (unfavorite an asset)
|
199
|
+
data, status_code, headers = api_instance.companies_company_id_users_user_id_favorites_favorite_id_delete_with_http_info(company_id, user_id, favorite_id)
|
200
|
+
p status_code # => 2xx
|
201
|
+
p headers # => { ... }
|
202
|
+
p data # => Object
|
203
|
+
rescue SparteraApiSdk::ApiError => e
|
204
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_favorite_id_delete_with_http_info: #{e}"
|
205
|
+
end
|
206
|
+
```
|
207
|
+
|
208
|
+
### Parameters
|
209
|
+
|
210
|
+
| Name | Type | Description | Notes |
|
211
|
+
| ---- | ---- | ----------- | ----- |
|
212
|
+
| **company_id** | **String** | | |
|
213
|
+
| **user_id** | **String** | | |
|
214
|
+
| **favorite_id** | **String** | | |
|
215
|
+
|
216
|
+
### Return type
|
217
|
+
|
218
|
+
**Object**
|
219
|
+
|
220
|
+
### Authorization
|
221
|
+
|
222
|
+
[bearerAuth](../README.md#bearerAuth)
|
223
|
+
|
224
|
+
### HTTP request headers
|
225
|
+
|
226
|
+
- **Content-Type**: Not defined
|
227
|
+
- **Accept**: application/json
|
228
|
+
|
229
|
+
|
230
|
+
## companies_company_id_users_user_id_favorites_favorite_id_get
|
231
|
+
|
232
|
+
> Object companies_company_id_users_user_id_favorites_favorite_id_get(company_id, user_id, favorite_id)
|
233
|
+
|
234
|
+
Get single favorite by ID
|
235
|
+
|
236
|
+
### Examples
|
237
|
+
|
238
|
+
```ruby
|
239
|
+
require 'time'
|
240
|
+
require 'spartera_api_sdk'
|
241
|
+
# setup authorization
|
242
|
+
SparteraApiSdk.configure do |config|
|
243
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
244
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
245
|
+
end
|
246
|
+
|
247
|
+
api_instance = SparteraApiSdk::FavoritesApi.new
|
248
|
+
company_id = 'company_id_example' # String |
|
249
|
+
user_id = 'user_id_example' # String |
|
250
|
+
favorite_id = 'favorite_id_example' # String |
|
251
|
+
|
252
|
+
begin
|
253
|
+
# Get single favorite by ID
|
254
|
+
result = api_instance.companies_company_id_users_user_id_favorites_favorite_id_get(company_id, user_id, favorite_id)
|
255
|
+
p result
|
256
|
+
rescue SparteraApiSdk::ApiError => e
|
257
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_favorite_id_get: #{e}"
|
258
|
+
end
|
259
|
+
```
|
260
|
+
|
261
|
+
#### Using the companies_company_id_users_user_id_favorites_favorite_id_get_with_http_info variant
|
262
|
+
|
263
|
+
This returns an Array which contains the response data, status code and headers.
|
264
|
+
|
265
|
+
> <Array(Object, Integer, Hash)> companies_company_id_users_user_id_favorites_favorite_id_get_with_http_info(company_id, user_id, favorite_id)
|
266
|
+
|
267
|
+
```ruby
|
268
|
+
begin
|
269
|
+
# Get single favorite by ID
|
270
|
+
data, status_code, headers = api_instance.companies_company_id_users_user_id_favorites_favorite_id_get_with_http_info(company_id, user_id, favorite_id)
|
271
|
+
p status_code # => 2xx
|
272
|
+
p headers # => { ... }
|
273
|
+
p data # => Object
|
274
|
+
rescue SparteraApiSdk::ApiError => e
|
275
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_favorite_id_get_with_http_info: #{e}"
|
276
|
+
end
|
277
|
+
```
|
278
|
+
|
279
|
+
### Parameters
|
280
|
+
|
281
|
+
| Name | Type | Description | Notes |
|
282
|
+
| ---- | ---- | ----------- | ----- |
|
283
|
+
| **company_id** | **String** | | |
|
284
|
+
| **user_id** | **String** | | |
|
285
|
+
| **favorite_id** | **String** | | |
|
286
|
+
|
287
|
+
### Return type
|
288
|
+
|
289
|
+
**Object**
|
290
|
+
|
291
|
+
### Authorization
|
292
|
+
|
293
|
+
[bearerAuth](../README.md#bearerAuth)
|
294
|
+
|
295
|
+
### HTTP request headers
|
296
|
+
|
297
|
+
- **Content-Type**: Not defined
|
298
|
+
- **Accept**: application/json
|
299
|
+
|
300
|
+
|
301
|
+
## companies_company_id_users_user_id_favorites_favorite_id_patch
|
302
|
+
|
303
|
+
> Object companies_company_id_users_user_id_favorites_favorite_id_patch(company_id, user_id, favorite_id, favorite)
|
304
|
+
|
305
|
+
Update an existing favorite by ID Can update notes, category, priority
|
306
|
+
|
307
|
+
### Examples
|
308
|
+
|
309
|
+
```ruby
|
310
|
+
require 'time'
|
311
|
+
require 'spartera_api_sdk'
|
312
|
+
# setup authorization
|
313
|
+
SparteraApiSdk.configure do |config|
|
314
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
315
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
316
|
+
end
|
317
|
+
|
318
|
+
api_instance = SparteraApiSdk::FavoritesApi.new
|
319
|
+
company_id = 'company_id_example' # String |
|
320
|
+
user_id = 'user_id_example' # String |
|
321
|
+
favorite_id = 'favorite_id_example' # String |
|
322
|
+
favorite = SparteraApiSdk::Favorite.new({asset_id: 'asset_id_example', company_id: 'company_id_example', priority: 'priority_example'}) # Favorite |
|
323
|
+
|
324
|
+
begin
|
325
|
+
# Update an existing favorite by ID Can update notes, category, priority
|
326
|
+
result = api_instance.companies_company_id_users_user_id_favorites_favorite_id_patch(company_id, user_id, favorite_id, favorite)
|
327
|
+
p result
|
328
|
+
rescue SparteraApiSdk::ApiError => e
|
329
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_favorite_id_patch: #{e}"
|
330
|
+
end
|
331
|
+
```
|
332
|
+
|
333
|
+
#### Using the companies_company_id_users_user_id_favorites_favorite_id_patch_with_http_info variant
|
334
|
+
|
335
|
+
This returns an Array which contains the response data, status code and headers.
|
336
|
+
|
337
|
+
> <Array(Object, Integer, Hash)> companies_company_id_users_user_id_favorites_favorite_id_patch_with_http_info(company_id, user_id, favorite_id, favorite)
|
338
|
+
|
339
|
+
```ruby
|
340
|
+
begin
|
341
|
+
# Update an existing favorite by ID Can update notes, category, priority
|
342
|
+
data, status_code, headers = api_instance.companies_company_id_users_user_id_favorites_favorite_id_patch_with_http_info(company_id, user_id, favorite_id, favorite)
|
343
|
+
p status_code # => 2xx
|
344
|
+
p headers # => { ... }
|
345
|
+
p data # => Object
|
346
|
+
rescue SparteraApiSdk::ApiError => e
|
347
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_favorite_id_patch_with_http_info: #{e}"
|
348
|
+
end
|
349
|
+
```
|
350
|
+
|
351
|
+
### Parameters
|
352
|
+
|
353
|
+
| Name | Type | Description | Notes |
|
354
|
+
| ---- | ---- | ----------- | ----- |
|
355
|
+
| **company_id** | **String** | | |
|
356
|
+
| **user_id** | **String** | | |
|
357
|
+
| **favorite_id** | **String** | | |
|
358
|
+
| **favorite** | [**Favorite**](Favorite.md) | | |
|
359
|
+
|
360
|
+
### Return type
|
361
|
+
|
362
|
+
**Object**
|
363
|
+
|
364
|
+
### Authorization
|
365
|
+
|
366
|
+
[bearerAuth](../README.md#bearerAuth)
|
367
|
+
|
368
|
+
### HTTP request headers
|
369
|
+
|
370
|
+
- **Content-Type**: application/json
|
371
|
+
- **Accept**: application/json
|
372
|
+
|
373
|
+
|
374
|
+
## companies_company_id_users_user_id_favorites_get
|
375
|
+
|
376
|
+
> Object companies_company_id_users_user_id_favorites_get(company_id, user_id)
|
377
|
+
|
378
|
+
Get a list of all favorites for a specific user Query params: - category: filter by category - sort: sort field (priority, date_created, etc.) - order: sort direction (asc, desc)
|
379
|
+
|
380
|
+
### Examples
|
381
|
+
|
382
|
+
```ruby
|
383
|
+
require 'time'
|
384
|
+
require 'spartera_api_sdk'
|
385
|
+
# setup authorization
|
386
|
+
SparteraApiSdk.configure do |config|
|
387
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
388
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
389
|
+
end
|
390
|
+
|
391
|
+
api_instance = SparteraApiSdk::FavoritesApi.new
|
392
|
+
company_id = 'company_id_example' # String |
|
393
|
+
user_id = 'user_id_example' # String |
|
394
|
+
|
395
|
+
begin
|
396
|
+
# Get a list of all favorites for a specific user Query params: - category: filter by category - sort: sort field (priority, date_created, etc.) - order: sort direction (asc, desc)
|
397
|
+
result = api_instance.companies_company_id_users_user_id_favorites_get(company_id, user_id)
|
398
|
+
p result
|
399
|
+
rescue SparteraApiSdk::ApiError => e
|
400
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_get: #{e}"
|
401
|
+
end
|
402
|
+
```
|
403
|
+
|
404
|
+
#### Using the companies_company_id_users_user_id_favorites_get_with_http_info variant
|
405
|
+
|
406
|
+
This returns an Array which contains the response data, status code and headers.
|
407
|
+
|
408
|
+
> <Array(Object, Integer, Hash)> companies_company_id_users_user_id_favorites_get_with_http_info(company_id, user_id)
|
409
|
+
|
410
|
+
```ruby
|
411
|
+
begin
|
412
|
+
# Get a list of all favorites for a specific user Query params: - category: filter by category - sort: sort field (priority, date_created, etc.) - order: sort direction (asc, desc)
|
413
|
+
data, status_code, headers = api_instance.companies_company_id_users_user_id_favorites_get_with_http_info(company_id, user_id)
|
414
|
+
p status_code # => 2xx
|
415
|
+
p headers # => { ... }
|
416
|
+
p data # => Object
|
417
|
+
rescue SparteraApiSdk::ApiError => e
|
418
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_get_with_http_info: #{e}"
|
419
|
+
end
|
420
|
+
```
|
421
|
+
|
422
|
+
### Parameters
|
423
|
+
|
424
|
+
| Name | Type | Description | Notes |
|
425
|
+
| ---- | ---- | ----------- | ----- |
|
426
|
+
| **company_id** | **String** | | |
|
427
|
+
| **user_id** | **String** | | |
|
428
|
+
|
429
|
+
### Return type
|
430
|
+
|
431
|
+
**Object**
|
432
|
+
|
433
|
+
### Authorization
|
434
|
+
|
435
|
+
[bearerAuth](../README.md#bearerAuth)
|
436
|
+
|
437
|
+
### HTTP request headers
|
438
|
+
|
439
|
+
- **Content-Type**: Not defined
|
440
|
+
- **Accept**: application/json
|
441
|
+
|
442
|
+
|
443
|
+
## companies_company_id_users_user_id_favorites_post
|
444
|
+
|
445
|
+
> Object companies_company_id_users_user_id_favorites_post(company_id, user_id, favorite)
|
446
|
+
|
447
|
+
POST /companies/{company_id}/users/{user_id}/favorites
|
448
|
+
|
449
|
+
### Examples
|
450
|
+
|
451
|
+
```ruby
|
452
|
+
require 'time'
|
453
|
+
require 'spartera_api_sdk'
|
454
|
+
# setup authorization
|
455
|
+
SparteraApiSdk.configure do |config|
|
456
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
457
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
458
|
+
end
|
459
|
+
|
460
|
+
api_instance = SparteraApiSdk::FavoritesApi.new
|
461
|
+
company_id = 'company_id_example' # String |
|
462
|
+
user_id = 'user_id_example' # String |
|
463
|
+
favorite = SparteraApiSdk::Favorite.new({asset_id: 'asset_id_example', company_id: 'company_id_example', priority: 'priority_example'}) # Favorite |
|
464
|
+
|
465
|
+
begin
|
466
|
+
# POST /companies/{company_id}/users/{user_id}/favorites
|
467
|
+
result = api_instance.companies_company_id_users_user_id_favorites_post(company_id, user_id, favorite)
|
468
|
+
p result
|
469
|
+
rescue SparteraApiSdk::ApiError => e
|
470
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_post: #{e}"
|
471
|
+
end
|
472
|
+
```
|
473
|
+
|
474
|
+
#### Using the companies_company_id_users_user_id_favorites_post_with_http_info variant
|
475
|
+
|
476
|
+
This returns an Array which contains the response data, status code and headers.
|
477
|
+
|
478
|
+
> <Array(Object, Integer, Hash)> companies_company_id_users_user_id_favorites_post_with_http_info(company_id, user_id, favorite)
|
479
|
+
|
480
|
+
```ruby
|
481
|
+
begin
|
482
|
+
# POST /companies/{company_id}/users/{user_id}/favorites
|
483
|
+
data, status_code, headers = api_instance.companies_company_id_users_user_id_favorites_post_with_http_info(company_id, user_id, favorite)
|
484
|
+
p status_code # => 2xx
|
485
|
+
p headers # => { ... }
|
486
|
+
p data # => Object
|
487
|
+
rescue SparteraApiSdk::ApiError => e
|
488
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_post_with_http_info: #{e}"
|
489
|
+
end
|
490
|
+
```
|
491
|
+
|
492
|
+
### Parameters
|
493
|
+
|
494
|
+
| Name | Type | Description | Notes |
|
495
|
+
| ---- | ---- | ----------- | ----- |
|
496
|
+
| **company_id** | **String** | | |
|
497
|
+
| **user_id** | **String** | | |
|
498
|
+
| **favorite** | [**Favorite**](Favorite.md) | | |
|
499
|
+
|
500
|
+
### Return type
|
501
|
+
|
502
|
+
**Object**
|
503
|
+
|
504
|
+
### Authorization
|
505
|
+
|
506
|
+
[bearerAuth](../README.md#bearerAuth)
|
507
|
+
|
508
|
+
### HTTP request headers
|
509
|
+
|
510
|
+
- **Content-Type**: application/json
|
511
|
+
- **Accept**: application/json
|
512
|
+
|
513
|
+
|
514
|
+
## companies_company_id_users_user_id_favorites_uncategorized_get
|
515
|
+
|
516
|
+
> Object companies_company_id_users_user_id_favorites_uncategorized_get(company_id, user_id)
|
517
|
+
|
518
|
+
Get all favorites for the specified user that don't have a category
|
519
|
+
|
520
|
+
### Examples
|
521
|
+
|
522
|
+
```ruby
|
523
|
+
require 'time'
|
524
|
+
require 'spartera_api_sdk'
|
525
|
+
# setup authorization
|
526
|
+
SparteraApiSdk.configure do |config|
|
527
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
528
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
529
|
+
end
|
530
|
+
|
531
|
+
api_instance = SparteraApiSdk::FavoritesApi.new
|
532
|
+
company_id = 'company_id_example' # String |
|
533
|
+
user_id = 'user_id_example' # String |
|
534
|
+
|
535
|
+
begin
|
536
|
+
# Get all favorites for the specified user that don't have a category
|
537
|
+
result = api_instance.companies_company_id_users_user_id_favorites_uncategorized_get(company_id, user_id)
|
538
|
+
p result
|
539
|
+
rescue SparteraApiSdk::ApiError => e
|
540
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_uncategorized_get: #{e}"
|
541
|
+
end
|
542
|
+
```
|
543
|
+
|
544
|
+
#### Using the companies_company_id_users_user_id_favorites_uncategorized_get_with_http_info variant
|
545
|
+
|
546
|
+
This returns an Array which contains the response data, status code and headers.
|
547
|
+
|
548
|
+
> <Array(Object, Integer, Hash)> companies_company_id_users_user_id_favorites_uncategorized_get_with_http_info(company_id, user_id)
|
549
|
+
|
550
|
+
```ruby
|
551
|
+
begin
|
552
|
+
# Get all favorites for the specified user that don't have a category
|
553
|
+
data, status_code, headers = api_instance.companies_company_id_users_user_id_favorites_uncategorized_get_with_http_info(company_id, user_id)
|
554
|
+
p status_code # => 2xx
|
555
|
+
p headers # => { ... }
|
556
|
+
p data # => Object
|
557
|
+
rescue SparteraApiSdk::ApiError => e
|
558
|
+
puts "Error when calling FavoritesApi->companies_company_id_users_user_id_favorites_uncategorized_get_with_http_info: #{e}"
|
559
|
+
end
|
560
|
+
```
|
561
|
+
|
562
|
+
### Parameters
|
563
|
+
|
564
|
+
| Name | Type | Description | Notes |
|
565
|
+
| ---- | ---- | ----------- | ----- |
|
566
|
+
| **company_id** | **String** | | |
|
567
|
+
| **user_id** | **String** | | |
|
568
|
+
|
569
|
+
### Return type
|
570
|
+
|
571
|
+
**Object**
|
572
|
+
|
573
|
+
### Authorization
|
574
|
+
|
575
|
+
[bearerAuth](../README.md#bearerAuth)
|
576
|
+
|
577
|
+
### HTTP request headers
|
578
|
+
|
579
|
+
- **Content-Type**: Not defined
|
580
|
+
- **Accept**: application/json
|
581
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# SparteraApiSdk::InlineObject
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **code** | **Integer** | | [optional] |
|
8
|
+
| **message** | **String** | | [optional] |
|
9
|
+
| **errors** | **Hash<String, Array<String>>** | | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'spartera_api_sdk'
|
15
|
+
|
16
|
+
instance = SparteraApiSdk::InlineObject.new(
|
17
|
+
code: 400,
|
18
|
+
message: null,
|
19
|
+
errors: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# SparteraApiSdk::InlineObject1
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **code** | **Integer** | | [optional] |
|
8
|
+
| **message** | **String** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'spartera_api_sdk'
|
14
|
+
|
15
|
+
instance = SparteraApiSdk::InlineObject1.new(
|
16
|
+
code: 401,
|
17
|
+
message: Authentication required
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# SparteraApiSdk::InlineObject2
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **code** | **Integer** | | [optional] |
|
8
|
+
| **message** | **String** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'spartera_api_sdk'
|
14
|
+
|
15
|
+
instance = SparteraApiSdk::InlineObject2.new(
|
16
|
+
code: 403,
|
17
|
+
message: Insufficient permissions
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# SparteraApiSdk::InlineObject3
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **code** | **Integer** | | [optional] |
|
8
|
+
| **message** | **String** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'spartera_api_sdk'
|
14
|
+
|
15
|
+
instance = SparteraApiSdk::InlineObject3.new(
|
16
|
+
code: 404,
|
17
|
+
message: Resource not found
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/User.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# SparteraApiSdk::User
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **user_id** | **String** | | [optional] |
|
8
|
+
| **company_id** | **String** | | |
|
9
|
+
| **function_id** | **String** | | [optional] |
|
10
|
+
| **status** | **String** | | |
|
11
|
+
| **email_address** | **String** | | [optional] |
|
12
|
+
| **timezone** | **String** | | [optional] |
|
13
|
+
| **date_created** | **String** | | [optional] |
|
14
|
+
| **last_updated** | **String** | | [optional] |
|
15
|
+
| **active** | **String** | | [optional] |
|
16
|
+
|
17
|
+
## Example
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'spartera_api_sdk'
|
21
|
+
|
22
|
+
instance = SparteraApiSdk::User.new(
|
23
|
+
user_id: null,
|
24
|
+
company_id: null,
|
25
|
+
function_id: null,
|
26
|
+
status: null,
|
27
|
+
email_address: null,
|
28
|
+
timezone: null,
|
29
|
+
date_created: null,
|
30
|
+
last_updated: null,
|
31
|
+
active: null
|
32
|
+
)
|
33
|
+
```
|
34
|
+
|