suggestgrid 0.1.17.pre.SNAPSHOT → 0.1.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/suggest_grid/api_helper.rb +2 -2
  3. data/lib/suggest_grid/configuration.rb +2 -1
  4. data/lib/suggest_grid/controllers/action_controller.rb +77 -99
  5. data/lib/suggest_grid/controllers/base_controller.rb +27 -2
  6. data/lib/suggest_grid/controllers/metadata_controller.rb +259 -209
  7. data/lib/suggest_grid/controllers/recommendation_controller.rb +32 -44
  8. data/lib/suggest_grid/controllers/similarity_controller.rb +32 -44
  9. data/lib/suggest_grid/controllers/type_controller.rb +74 -104
  10. data/lib/suggest_grid/exceptions/api_exception.rb +1 -1
  11. data/lib/suggest_grid/exceptions/delete_error_response_exception.rb +52 -0
  12. data/lib/suggest_grid/exceptions/detailed_error_response_exception.rb +3 -3
  13. data/lib/suggest_grid/exceptions/error_response_exception.rb +3 -3
  14. data/lib/suggest_grid/exceptions/limit_exceeded_error_response_exception.rb +3 -3
  15. data/lib/suggest_grid/http/auth/basic_auth.rb +17 -0
  16. data/lib/suggest_grid/http/faraday_client.rb +43 -0
  17. data/lib/suggest_grid/http/http_call_back.rb +2 -2
  18. data/lib/suggest_grid/http/http_client.rb +13 -43
  19. data/lib/suggest_grid/http/http_request.rb +24 -8
  20. data/lib/suggest_grid/models/actions_response.rb +58 -0
  21. data/lib/suggest_grid/models/{schema_error_response.rb → bulk_post_error.rb} +4 -4
  22. data/lib/suggest_grid/models/bulk_post_response.rb +49 -0
  23. data/lib/suggest_grid/models/get_recommended_items_body.rb +14 -5
  24. data/lib/suggest_grid/models/get_recommended_users_body.rb +11 -2
  25. data/lib/suggest_grid/models/get_similar_items_body.rb +14 -5
  26. data/lib/suggest_grid/models/get_similar_users_body.rb +11 -2
  27. data/lib/suggest_grid/models/items_response.rb +10 -1
  28. data/lib/suggest_grid/models/users_response.rb +10 -1
  29. data/lib/suggest_grid.rb +53 -53
  30. data/spec/swagger.yaml +185 -87
  31. metadata +41 -15
  32. data/lib/suggest_grid/exceptions/bulk_schema_error_response_exception.rb +0 -37
  33. data/lib/suggest_grid/http/unirest_client.rb +0 -41
  34. data/lib/suggest_grid/models/count_response.rb +0 -35
  35. data/lib/suggest_grid/models/delete_error_response.rb +0 -80
  36. data/lib/suggest_grid/models/metadata_information_response.rb +0 -35
@@ -6,7 +6,11 @@ module SuggestGrid
6
6
  # @return [Long]
7
7
  attr_accessor :count
8
8
 
9
- # The number of users in the response.
9
+ # The total number of users available.
10
+ # @return [Long]
11
+ attr_accessor :total_count
12
+
13
+ # The total number of users available.
10
14
  # @return [List of Metadata]
11
15
  attr_accessor :users
12
16
 
@@ -15,14 +19,17 @@ module SuggestGrid
15
19
  if @hash.nil?
16
20
  @hash = {}
17
21
  @hash["count"] = "count"
22
+ @hash["total_count"] = "total_count"
18
23
  @hash["users"] = "users"
19
24
  end
20
25
  @hash
21
26
  end
22
27
 
23
28
  def initialize(count = nil,
29
+ total_count = nil,
24
30
  users = nil)
25
31
  @count = count
32
+ @total_count = total_count
26
33
  @users = users
27
34
  end
28
35
 
@@ -33,6 +40,7 @@ module SuggestGrid
33
40
  else
34
41
  # Extract variables from the hash
35
42
  count = hash["count"]
43
+ total_count = hash["total_count"]
36
44
  # Parameter is an array, so we need to iterate through it
37
45
  users = nil
38
46
  if hash["users"] != nil
@@ -42,6 +50,7 @@ module SuggestGrid
42
50
 
43
51
  # Create object from extracted values
44
52
  UsersResponse.new(count,
53
+ total_count,
45
54
  users)
46
55
  end
47
56
  end
data/lib/suggest_grid.rb CHANGED
@@ -1,53 +1,53 @@
1
- # This file was automatically generated for SuggestGrid by APIMATIC v2.0 ( https://apimatic.io ).
2
- require 'openssl'
3
- require 'json'
4
- require 'faraday'
5
-
6
- # APIMATIC Helper Files
7
- require_relative 'suggest_grid/api_helper.rb'
8
- require_relative 'suggest_grid/configuration.rb'
9
- require_relative 'suggest_grid/suggest_grid_client.rb'
10
-
11
- # Http
12
- require_relative 'suggest_grid/http/http_call_back.rb'
13
- require_relative 'suggest_grid/http/http_client.rb'
14
- require_relative 'suggest_grid/http/http_method_enum.rb'
15
- require_relative 'suggest_grid/http/http_request.rb'
16
- require_relative 'suggest_grid/http/http_response.rb'
17
- require_relative 'suggest_grid/http/http_context.rb'
18
- require_relative 'suggest_grid/http/unirest_client.rb'
19
-
20
- # Models
21
- require_relative 'suggest_grid/models/base_model.rb'
22
- require_relative 'suggest_grid/models/action.rb'
23
- require_relative 'suggest_grid/models/metadata.rb'
24
- require_relative 'suggest_grid/models/type_request_body.rb'
25
- require_relative 'suggest_grid/models/get_recommended_users_body.rb'
26
- require_relative 'suggest_grid/models/get_recommended_items_body.rb'
27
- require_relative 'suggest_grid/models/get_similar_users_body.rb'
28
- require_relative 'suggest_grid/models/get_similar_items_body.rb'
29
- require_relative 'suggest_grid/models/message_response.rb'
30
- require_relative 'suggest_grid/models/count_response.rb'
31
- require_relative 'suggest_grid/models/delete_error_response.rb'
32
- require_relative 'suggest_grid/models/delete_success_response.rb'
33
- require_relative 'suggest_grid/models/get_types_response.rb'
34
- require_relative 'suggest_grid/models/get_type_response.rb'
35
- require_relative 'suggest_grid/models/schema_error_response.rb'
36
- require_relative 'suggest_grid/models/metadata_information_response.rb'
37
- require_relative 'suggest_grid/models/users_response.rb'
38
- require_relative 'suggest_grid/models/items_response.rb'
39
-
40
- # Exceptions
41
- require_relative 'suggest_grid/exceptions/api_exception.rb'
42
- require_relative 'suggest_grid/exceptions/error_response_exception.rb'
43
- require_relative 'suggest_grid/exceptions/detailed_error_response_exception.rb'
44
- require_relative 'suggest_grid/exceptions/limit_exceeded_error_response_exception.rb'
45
- require_relative 'suggest_grid/exceptions/bulk_schema_error_response_exception.rb'
46
-
47
- # Controllers
48
- require_relative 'suggest_grid/controllers/base_controller.rb'
49
- require_relative 'suggest_grid/controllers/type_controller.rb'
50
- require_relative 'suggest_grid/controllers/action_controller.rb'
51
- require_relative 'suggest_grid/controllers/metadata_controller.rb'
52
- require_relative 'suggest_grid/controllers/recommendation_controller.rb'
53
- require_relative 'suggest_grid/controllers/similarity_controller.rb'
1
+ # This file was automatically generated for SuggestGrid by APIMATIC v2.0 ( https://apimatic.io ).
2
+ require 'json'
3
+ require 'faraday'
4
+ require 'certifi'
5
+
6
+ require_relative 'suggest_grid/api_helper.rb'
7
+ require_relative 'suggest_grid/suggest_grid_client.rb'
8
+
9
+ # Http
10
+ require_relative 'suggest_grid/http/http_call_back.rb'
11
+ require_relative 'suggest_grid/http/http_client.rb'
12
+ require_relative 'suggest_grid/http/http_method_enum.rb'
13
+ require_relative 'suggest_grid/http/http_request.rb'
14
+ require_relative 'suggest_grid/http/http_response.rb'
15
+ require_relative 'suggest_grid/http/http_context.rb'
16
+ require_relative 'suggest_grid/http/faraday_client.rb'
17
+ require_relative 'suggest_grid/http/auth/basic_auth.rb'
18
+
19
+ # Models
20
+ require_relative 'suggest_grid/models/base_model.rb'
21
+ require_relative 'suggest_grid/models/action.rb'
22
+ require_relative 'suggest_grid/models/metadata.rb'
23
+ require_relative 'suggest_grid/models/type_request_body.rb'
24
+ require_relative 'suggest_grid/models/get_recommended_users_body.rb'
25
+ require_relative 'suggest_grid/models/get_recommended_items_body.rb'
26
+ require_relative 'suggest_grid/models/get_similar_users_body.rb'
27
+ require_relative 'suggest_grid/models/get_similar_items_body.rb'
28
+ require_relative 'suggest_grid/models/message_response.rb'
29
+ require_relative 'suggest_grid/models/actions_response.rb'
30
+ require_relative 'suggest_grid/models/delete_success_response.rb'
31
+ require_relative 'suggest_grid/models/get_types_response.rb'
32
+ require_relative 'suggest_grid/models/get_type_response.rb'
33
+ require_relative 'suggest_grid/models/bulk_post_response.rb'
34
+ require_relative 'suggest_grid/models/bulk_post_error.rb'
35
+ require_relative 'suggest_grid/models/users_response.rb'
36
+ require_relative 'suggest_grid/models/items_response.rb'
37
+
38
+ # Exceptions
39
+ require_relative 'suggest_grid/exceptions/api_exception.rb'
40
+ require_relative 'suggest_grid/exceptions/error_response_exception.rb'
41
+ require_relative 'suggest_grid/exceptions/detailed_error_response_exception.rb'
42
+ require_relative 'suggest_grid/exceptions/limit_exceeded_error_response_exception.rb'
43
+ require_relative 'suggest_grid/exceptions/delete_error_response_exception.rb'
44
+
45
+ require_relative 'suggest_grid/configuration.rb'
46
+
47
+ # Controllers
48
+ require_relative 'suggest_grid/controllers/base_controller.rb'
49
+ require_relative 'suggest_grid/controllers/type_controller.rb'
50
+ require_relative 'suggest_grid/controllers/action_controller.rb'
51
+ require_relative 'suggest_grid/controllers/metadata_controller.rb'
52
+ require_relative 'suggest_grid/controllers/recommendation_controller.rb'
53
+ require_relative 'suggest_grid/controllers/similarity_controller.rb'
data/spec/swagger.yaml CHANGED
@@ -2,7 +2,7 @@ swagger: '2.0'
2
2
 
3
3
  info:
4
4
  title: SuggestGrid
5
- version: 0.1.17-SNAPSHOT
5
+ version: 0.1.27
6
6
  description: SuggestGrid is a recommendation and personalization service.
7
7
  x-codegen-settings:
8
8
  appendContentHeaders: true
@@ -44,7 +44,7 @@ tags:
44
44
  description: Type Methods
45
45
  x-docs-text: |
46
46
  Type methods are used for managing SuggestGrid types.
47
- For more information on types, refer to [Types concept documentation](http://www.suggestgrid.com/docs/concepts#types).
47
+ For more information on types, refer to [Types concept documentation](http://www.suggestgrid.com/docs/types).
48
48
  x-methods:
49
49
  - create_type
50
50
  - get_type
@@ -55,7 +55,7 @@ tags:
55
55
  description: Action Methods
56
56
  x-docs-text: |
57
57
  Action methods are for posting and deleting actions.
58
- For more information on actions, refer to [Actions concept documentation](http://www.suggestgrid.com/docs/concepts#actions).
58
+ For more information on actions, refer to [Actions concept documentation](http://www.suggestgrid.com/docs/actions).
59
59
  x-methods:
60
60
  - post_action
61
61
  - post_bulk_actions
@@ -65,15 +65,17 @@ tags:
65
65
  description: Metadata Methods
66
66
  x-docs-text: |
67
67
  Metadata methods are for posting and deleting metadata.
68
- For more information on metadata, refer to [Metadata concept documentation ](http://www.suggestgrid.com/docs/concepts#metadata).
68
+ For more information on metadata, refer to [Metadata concept documentation ](http://www.suggestgrid.com/docs/metadata).
69
69
  x-methods:
70
70
  - post_user
71
71
  - post_bulk_users
72
+ - get_user
72
73
  - get_users
73
74
  - delete_user
74
75
  - delete_all_users
75
76
  - post_item
76
77
  - post_bulk_items
78
+ - get_item
77
79
  - get_items
78
80
  - delete_item
79
81
  - delete_all_items
@@ -81,7 +83,7 @@ tags:
81
83
  description: Recommnedation Methods
82
84
  x-docs-text: |
83
85
  Recommnedation methods are for getting recommended items or users responses from SuggestGrid.
84
- For more information on recommendations, refer to [Recommendations concept documentation](http://www.suggestgrid.com/docs/concepts#recommendations).
86
+ For more information on recommendations, refer to [Recommendations concept documentation](http://www.suggestgrid.com/docs/recommendations).
85
87
  x-methods:
86
88
  - get_recommended_users
87
89
  - get_recommended_items
@@ -89,7 +91,7 @@ tags:
89
91
  description: Similarity Methods
90
92
  x-docs-text: |
91
93
  Similarity methods are for getting similar items or users responses from SuggestGrid.
92
- For more information on similars, refer to [Similarities concept documentation](http://www.suggestgrid.com/docs/concepts#similarities).
94
+ For more information on similars, refer to [Similarities concept documentation](http://www.suggestgrid.com/docs/similarities).
93
95
  x-methods:
94
96
  - get_similar_users
95
97
  - get_similar_items
@@ -120,8 +122,8 @@ definitions:
120
122
  Filter:
121
123
  type: object
122
124
  description: |
123
- Contraints on the returned users or items.
124
- Filter structure is defined in [the filter parameter documentation](http://www.suggestgrid.com/docs/concepts#filters-parameter).
125
+ Contraints on the returned users or items.
126
+ Filter structure is defined in [the filter parameter documentation](http://www.suggestgrid.com/docs/advanced-features#filters-parameter).
125
127
  additionalProperties:
126
128
  type:
127
129
  - string
@@ -174,6 +176,9 @@ definitions:
174
176
  description: The item ids of the query. Exactly one of item id or item ids parameters must be provided.
175
177
  items:
176
178
  type: string
179
+ from:
180
+ type: integer
181
+ description: The number of most recommended items to be skipped.
177
182
  size:
178
183
  type: integer
179
184
  description: The number of users asked to return in the response.
@@ -215,9 +220,12 @@ definitions:
215
220
  description: The user ids of the query. Exactly one of user id or user ids parameters must be provided.
216
221
  items:
217
222
  type: string
223
+ from:
224
+ type: integer
225
+ description: The number of most recommended items to be skipped.
218
226
  size:
219
227
  type: integer
220
- description: The number of users asked to return in the response.
228
+ description: The number of items asked to return in the response.
221
229
  similar_item_id:
222
230
  type: string
223
231
  description: Similar item that the response should be similar to.
@@ -230,14 +238,14 @@ definitions:
230
238
  type: array
231
239
  items:
232
240
  type: string
233
- description: The metadata fields that are to be included in returned users.
241
+ description: The metadata fields that are to be included in returned items.
234
242
  filter:
235
243
  $ref: '#/definitions/Filter'
236
244
  except:
237
245
  type: array
238
246
  items:
239
247
  type: string
240
- description: These user ids that will not be included in the response.
248
+ description: These item ids that will not be included in the response.
241
249
  GetSimilarUsersBody:
242
250
  type: object
243
251
  description: The query for similar users.
@@ -256,6 +264,9 @@ definitions:
256
264
  description: The user ids of the query. Exactly one of user id or user ids parameters must be provided.
257
265
  items:
258
266
  type: string
267
+ from:
268
+ type: integer
269
+ description: The number of most similar users to be skipped.
259
270
  size:
260
271
  type: integer
261
272
  description: The number of users asked to return in the response.
@@ -291,21 +302,24 @@ definitions:
291
302
  Get similar items to given item ids. Either item id or item ids must be provided.
292
303
  items:
293
304
  type: string
305
+ from:
306
+ type: integer
307
+ description: The number of most similar items to be skipped.
294
308
  size:
295
309
  type: integer
296
- description: The number of users asked to return in the response.
310
+ description: The number of items asked to return in the response.
297
311
  fields:
298
312
  type: array
299
313
  items:
300
314
  type: string
301
- description: The metadata fields that are to be included in returned users.
315
+ description: The metadata fields that are to be included in returned items.
302
316
  filter:
303
317
  $ref: '#/definitions/Filter'
304
318
  except:
305
319
  type: array
306
320
  items:
307
321
  type: string
308
- description: These user ids that will not be included in the response.
322
+ description: These item ids that will not be included in the response.
309
323
  # Responses
310
324
  MessageResponse:
311
325
  type: object
@@ -314,14 +328,22 @@ definitions:
314
328
  message:
315
329
  type: string
316
330
  description: Message of the response.
317
- CountResponse:
331
+ ActionsResponse:
318
332
  type: object
319
- description: Count response.
333
+ description: Paged actions response.
320
334
  properties:
321
335
  count:
322
336
  type: integer
323
- format: int32
324
- description: The count that is asked in the query.
337
+ format: int64
338
+ description: The number of actions in the response.
339
+ total_count:
340
+ type: integer
341
+ format: int64
342
+ description: The total number of actions.
343
+ actions:
344
+ type: array
345
+ items:
346
+ $ref: '#/definitions/Action'
325
347
  ErrorResponse:
326
348
  type: object
327
349
  description: Error response.
@@ -436,11 +458,11 @@ definitions:
436
458
  rating:
437
459
  type: string
438
460
  description: Rating type of the type that is either implicit or explicit.
439
- BulkSchemaErrorResponse:
461
+ BulkPostResponse:
440
462
  type: object
441
463
  description: |
442
464
  Bulk error response.
443
- Returned on bulk post requests with failures.
465
+ Returned on all bulk post requests regardless of the number of erroneous or successful posts.
444
466
  properties:
445
467
  message:
446
468
  type: string
@@ -448,10 +470,10 @@ definitions:
448
470
  errors:
449
471
  type: array
450
472
  items:
451
- $ref: '#/definitions/SchemaErrorResponse'
452
- SchemaErrorResponse:
473
+ $ref: '#/definitions/BulkPostError'
474
+ BulkPostError:
453
475
  type: object
454
- description: Error response returned due to Schema validations.
476
+ description: Error response returned due to bulk post schema validations.
455
477
  properties:
456
478
  message:
457
479
  type: string
@@ -462,34 +484,34 @@ definitions:
462
484
  error:
463
485
  type: object
464
486
  description: Programatic description of the error.
465
- MetadataInformationResponse:
466
- type: object
467
- description: Metadata iformation response.
468
- properties:
469
- count:
470
- type: integer
471
- format: int64
472
- description: The number of users or items with metadata.
473
487
  UsersResponse:
474
488
  type: object
475
- description: Users response.
489
+ description: Get users response.
476
490
  properties:
477
491
  count:
478
492
  type: integer
479
493
  format: int64
480
494
  description: The number of users in the response.
495
+ total_count:
496
+ type: integer
497
+ format: int64
498
+ description: The total number of users available.
481
499
  users:
482
500
  type: array
483
501
  items:
484
502
  $ref: '#/definitions/Metadata'
485
503
  ItemsResponse:
486
504
  type: object
487
- description: Items response.
505
+ description: Get items response.
488
506
  properties:
489
507
  count:
490
508
  type: integer
491
509
  format: int64
492
510
  description: The number of items in the response.
511
+ total_count:
512
+ type: integer
513
+ format: int64
514
+ description: The total number of items available.
493
515
  items:
494
516
  type: array
495
517
  items:
@@ -688,14 +710,8 @@ paths:
688
710
  operationId: get_actions
689
711
  summary: Get Actions
690
712
  description: |
691
- Type must be provided. Additionally,
692
-
693
- * If both `user_id` and `item_id` are supplied it returns the count of the corresponding actions.
694
- * If only `user_id` is provided, it returns the count of all the action of the given user.
695
- * If only `user_id` is provided, it returns the count of all the action of the given item.
696
- * If only `older_than` is provided, it returns the count of actions older than the given timestamp.
697
- * If a few of these parameters are provided, it returns the count of the intersection of these parameters.
698
- * If none of these are provided, it returns the count of the whole type.
713
+ Get actions. Defaut responses will be paged by 10 actios each.
714
+ Type, user id, item id, or older than parameters could be provided.
699
715
  parameters:
700
716
  - name: type
701
717
  in: query
@@ -718,20 +734,34 @@ paths:
718
734
  - name: older_than
719
735
  in: query
720
736
  description: |
721
- Delete all actions of a type older than the given timestamp or time.
737
+ Maxium timestamp of the actions.
722
738
  Valid times are 1s, 1m, 1h, 1d, 1M, 1y, or unix timestamp (like 1443798195).
723
739
  required: false
724
740
  type: string
725
741
  format: id
742
+ - name: size
743
+ in: query
744
+ description: |
745
+ The number of the users response.
746
+ Defaults to 10. Must be between 1 and 10.000 inclusive.
747
+ This parameter must be string represetation of an integer like "1".
748
+ required: false
749
+ type: integer
750
+ format: int32
751
+ - name: from
752
+ in: query
753
+ description: |
754
+ The number of users to be skipped for response.
755
+ Defaults to 0. Must be bigger than or equal to 0.
756
+ This parameter must be string represetation of an integer like "1".
757
+ required: false
758
+ type: integer
759
+ format: int32
726
760
  responses:
727
761
  200:
728
- description: Successfully deleted actions.
729
- schema:
730
- $ref: '#/definitions/CountResponse'
731
- 400:
732
- description: Required `user_id` or `item_id` parameters are missing from the request body.
762
+ description: Paged actions response.
733
763
  schema:
734
- $ref: '#/definitions/ErrorResponse'
764
+ $ref: '#/definitions/ActionsResponse'
735
765
  429:
736
766
  description: Too many requests.
737
767
  schema:
@@ -785,15 +815,15 @@ paths:
785
815
  200:
786
816
  description: Successfully deleted actions.
787
817
  schema:
788
- $ref: '#/definitions/MessageResponse'
818
+ $ref: '#/definitions/DeleteSuccessResponse'
789
819
  400:
790
820
  description: Required `user_id` or `item_id` parameters are missing from the request body.
791
821
  schema:
792
822
  $ref: '#/definitions/ErrorResponse'
793
823
  404:
794
- description: Type does not exists.
824
+ description: Delete actions not found.
795
825
  schema:
796
- $ref: '#/definitions/ErrorResponse'
826
+ $ref: '#/definitions/DeleteErrorResponse'
797
827
  422:
798
828
  description: No query parameter (`user_id`, `item_id`, or `older_than`) is given. In order to delete all actionsdelete the type.
799
829
  schema:
@@ -835,11 +865,7 @@ paths:
835
865
  201:
836
866
  description: Bulk action request executed.
837
867
  schema:
838
- $ref: '#/definitions/MessageResponse'
839
- 209:
840
- description: Some metadata is not uploaded successfully.
841
- schema:
842
- $ref: '#/definitions/BulkSchemaErrorResponse'
868
+ $ref: '#/definitions/BulkPostResponse'
843
869
  400:
844
870
  description: Body is missing.
845
871
  schema:
@@ -858,19 +884,38 @@ paths:
858
884
  $ref: '#/definitions/ErrorResponse'
859
885
  # Metadata Paths
860
886
  /v1/users/{user_id}:
887
+ parameters:
888
+ - name: user_id
889
+ in: path
890
+ description: The user id to delete its metadata.
891
+ required: true
892
+ type: string
893
+ format: id
894
+ get:
895
+ tags:
896
+ - metadata
897
+ operationId: get_user
898
+ summary: Get An User
899
+ description: Returns an user metadata if it exists.
900
+ responses:
901
+ 200:
902
+ description: Returns an user metadata.
903
+ schema:
904
+ $ref: '#/definitions/Metadata'
905
+ 404:
906
+ description: User not found.
907
+ schema:
908
+ $ref: '#/definitions/ErrorResponse'
909
+ default:
910
+ description: Unexpected internal error.
911
+ schema:
912
+ $ref: '#/definitions/ErrorResponse'
861
913
  delete:
862
914
  tags:
863
915
  - metadata
864
916
  operationId: delete_user
865
917
  summary: Delete a User
866
918
  description: Deletes a user metadata with the given user id.
867
- parameters:
868
- - name: user_id
869
- in: path
870
- description: The user id to delete its metadata.
871
- required: true
872
- type: string
873
- format: id
874
919
  responses:
875
920
  200:
876
921
  description: Deleted a user metadata.
@@ -920,12 +965,33 @@ paths:
920
965
  - metadata
921
966
  operationId: get_users
922
967
  summary: Get Users
923
- description: Get information about users. Only returns count at the moment.
968
+ description: |
969
+ Get items and total count of items.
970
+ Page and per-page parameters could be set.
971
+ parameters:
972
+ - name: size
973
+ in: query
974
+ description: |
975
+ The number of the users response.
976
+ Defaults to 10. Must be between 1 and 10.000 inclusive.
977
+ This parameter must be string represetation of an integer like "1".
978
+ required: false
979
+ type: integer
980
+ format: int32
981
+ - name: from
982
+ in: query
983
+ description: |
984
+ The number of users to be skipped for response.
985
+ Defaults to 0. Must be bigger than or equal to 0.
986
+ This parameter must be string represetation of an integer like "1".
987
+ required: false
988
+ type: integer
989
+ format: int32
924
990
  responses:
925
991
  200:
926
- description: Information on users.
992
+ description: Get users response.
927
993
  schema:
928
- $ref: '#/definitions/MetadataInformationResponse'
994
+ $ref: '#/definitions/UsersResponse'
929
995
  429:
930
996
  description: Too many requests.
931
997
  schema:
@@ -954,19 +1020,38 @@ paths:
954
1020
  schema:
955
1021
  $ref: '#/definitions/ErrorResponse'
956
1022
  /v1/items/{item_id}:
1023
+ parameters:
1024
+ - name: item_id
1025
+ in: path
1026
+ description: The item id to delete its metadata.
1027
+ required: true
1028
+ type: string
1029
+ format: id
1030
+ get:
1031
+ tags:
1032
+ - metadata
1033
+ operationId: get_item
1034
+ summary: Get An Item
1035
+ description: Returns an item metadata if it exists.
1036
+ responses:
1037
+ 200:
1038
+ description: Returns an item metadata.
1039
+ schema:
1040
+ $ref: '#/definitions/Metadata'
1041
+ 404:
1042
+ description: Item not found.
1043
+ schema:
1044
+ $ref: '#/definitions/ErrorResponse'
1045
+ default:
1046
+ description: Unexpected internal error.
1047
+ schema:
1048
+ $ref: '#/definitions/ErrorResponse'
957
1049
  delete:
958
1050
  tags:
959
1051
  - metadata
960
1052
  operationId: delete_item
961
- summary: Delete an Item
1053
+ summary: Delete An Item
962
1054
  description: Deletes an item metadata with the given item id.
963
- parameters:
964
- - name: item_id
965
- in: path
966
- description: The item id to delete its metadata.
967
- required: true
968
- type: string
969
- format: id
970
1055
  responses:
971
1056
  200:
972
1057
  description: Deleted an item metadata.
@@ -1018,12 +1103,33 @@ paths:
1018
1103
  - metadata
1019
1104
  operationId: get_items
1020
1105
  summary: Get Items
1021
- description: Get information about items. Only returns count at the moment.
1106
+ description: |
1107
+ Get items and total count of items.
1108
+ Page and per-page parameters could be set.
1109
+ parameters:
1110
+ - name: size
1111
+ in: query
1112
+ description: |
1113
+ The number of the users response.
1114
+ Defaults to 10. Must be between 1 and 10.000 inclusive.
1115
+ This parameter must be string represetation of an integer like "1".
1116
+ required: false
1117
+ type: integer
1118
+ format: int32
1119
+ - name: from
1120
+ in: query
1121
+ description: |
1122
+ The number of users to be skipped for response.
1123
+ Defaults to 0. Must be bigger than or equal to 0.
1124
+ This parameter must be string represetation of an integer like "1".
1125
+ required: false
1126
+ type: integer
1127
+ format: int32
1022
1128
  responses:
1023
1129
  200:
1024
- description: Information on items.
1130
+ description: Get items response.
1025
1131
  schema:
1026
- $ref: '#/definitions/MetadataInformationResponse'
1132
+ $ref: '#/definitions/ItemsResponse'
1027
1133
  429:
1028
1134
  description: Too many requests.
1029
1135
  schema:
@@ -1079,11 +1185,7 @@ paths:
1079
1185
  201:
1080
1186
  description: Bulk user metadata request executed.
1081
1187
  schema:
1082
- $ref: '#/definitions/MessageResponse'
1083
- 209:
1084
- description: Some metadata is not uploaded successfully.
1085
- schema:
1086
- $ref: '#/definitions/BulkSchemaErrorResponse'
1188
+ $ref: '#/definitions/BulkPostResponse'
1087
1189
  400:
1088
1190
  description: Body is missing.
1089
1191
  schema:
@@ -1122,11 +1224,7 @@ paths:
1122
1224
  201:
1123
1225
  description: Bulk item metadata request executed.
1124
1226
  schema:
1125
- $ref: '#/definitions/MessageResponse'
1126
- 209:
1127
- description: Some metadata is not uploaded successfully.
1128
- schema:
1129
- $ref: '#/definitions/BulkSchemaErrorResponse'
1227
+ $ref: '#/definitions/BulkPostResponse'
1130
1228
  400:
1131
1229
  description: Body is missing.
1132
1230
  schema: