ddr_client 2.0.0.d9f2bd2b

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.
Files changed (120) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +168 -0
  4. data/Rakefile +8 -0
  5. data/ddr_client.gemspec +46 -0
  6. data/docs/BatchObjectsApi.md +125 -0
  7. data/docs/BatchesApi.md +305 -0
  8. data/docs/DdrAPIBatchEntity.md +24 -0
  9. data/docs/DdrAPIBatchEntityLogfile.md +11 -0
  10. data/docs/DdrAPIBatchObjectAttributeEntity.md +16 -0
  11. data/docs/DdrAPIBatchObjectDatastreamEntity.md +17 -0
  12. data/docs/DdrAPIBatchObjectEntity.md +26 -0
  13. data/docs/DdrAPIBatchObjectMessageEntity.md +13 -0
  14. data/docs/DdrAPIBatchObjectRelationshipEntity.md +15 -0
  15. data/docs/DdrAPIBatchObjectRoleEntity.md +15 -0
  16. data/docs/DdrAPIEventEntity.md +17 -0
  17. data/docs/DdrAPIFileEntity.md +11 -0
  18. data/docs/DdrAPIGroupEntity.md +10 -0
  19. data/docs/DdrAPIGroupMemberEntity.md +10 -0
  20. data/docs/DdrAPILinkEntity.md +9 -0
  21. data/docs/DdrAPIResourceEntity.md +17 -0
  22. data/docs/DdrAPIResourceEntityFiles.md +17 -0
  23. data/docs/DdrAPIResourceEntityMetadata.md +62 -0
  24. data/docs/DdrAPIResourceEntityRelated.md +11 -0
  25. data/docs/DdrAPIRoleEntity.md +10 -0
  26. data/docs/DdrAPITechnicalMetadataEntity.md +24 -0
  27. data/docs/DdrAPIUserEntity.md +19 -0
  28. data/docs/EventsApi.md +131 -0
  29. data/docs/GroupsApi.md +63 -0
  30. data/docs/IndexApi.md +161 -0
  31. data/docs/PatchResources.md +11 -0
  32. data/docs/PatchResourcesMetadata.md +62 -0
  33. data/docs/PatchResourcesRelated.md +11 -0
  34. data/docs/PatchResourcesRoles.md +10 -0
  35. data/docs/PostResources.md +12 -0
  36. data/docs/QueuesApi.md +102 -0
  37. data/docs/ReportsApi.md +177 -0
  38. data/docs/ResourcesApi.md +1003 -0
  39. data/docs/SchemaApi.md +128 -0
  40. data/docs/UsersApi.md +131 -0
  41. data/git_push.sh +55 -0
  42. data/lib/ddr_client/api/batch_objects_api.rb +138 -0
  43. data/lib/ddr_client/api/batches_api.rb +306 -0
  44. data/lib/ddr_client/api/events_api.rb +147 -0
  45. data/lib/ddr_client/api/groups_api.rb +70 -0
  46. data/lib/ddr_client/api/index_api.rb +164 -0
  47. data/lib/ddr_client/api/queues_api.rb +109 -0
  48. data/lib/ddr_client/api/reports_api.rb +179 -0
  49. data/lib/ddr_client/api/resources_api.rb +1098 -0
  50. data/lib/ddr_client/api/schema_api.rb +152 -0
  51. data/lib/ddr_client/api/users_api.rb +141 -0
  52. data/lib/ddr_client/api_client.rb +391 -0
  53. data/lib/ddr_client/api_error.rb +38 -0
  54. data/lib/ddr_client/configuration.rb +209 -0
  55. data/lib/ddr_client/models/ddr_api_batch_entity.rb +333 -0
  56. data/lib/ddr_client/models/ddr_api_batch_entity_logfile.rb +211 -0
  57. data/lib/ddr_client/models/ddr_api_batch_object_attribute_entity.rb +256 -0
  58. data/lib/ddr_client/models/ddr_api_batch_object_datastream_entity.rb +265 -0
  59. data/lib/ddr_client/models/ddr_api_batch_object_entity.rb +349 -0
  60. data/lib/ddr_client/models/ddr_api_batch_object_message_entity.rb +230 -0
  61. data/lib/ddr_client/models/ddr_api_batch_object_relationship_entity.rb +247 -0
  62. data/lib/ddr_client/models/ddr_api_batch_object_role_entity.rb +247 -0
  63. data/lib/ddr_client/models/ddr_api_event_entity.rb +325 -0
  64. data/lib/ddr_client/models/ddr_api_file_entity.rb +215 -0
  65. data/lib/ddr_client/models/ddr_api_group_entity.rb +203 -0
  66. data/lib/ddr_client/models/ddr_api_group_member_entity.rb +202 -0
  67. data/lib/ddr_client/models/ddr_api_link_entity.rb +193 -0
  68. data/lib/ddr_client/models/ddr_api_resource_entity.rb +310 -0
  69. data/lib/ddr_client/models/ddr_api_resource_entity_files.rb +276 -0
  70. data/lib/ddr_client/models/ddr_api_resource_entity_metadata.rb +874 -0
  71. data/lib/ddr_client/models/ddr_api_resource_entity_related.rb +216 -0
  72. data/lib/ddr_client/models/ddr_api_role_entity.rb +251 -0
  73. data/lib/ddr_client/models/ddr_api_technical_metadata_entity.rb +329 -0
  74. data/lib/ddr_client/models/ddr_api_user_entity.rb +296 -0
  75. data/lib/ddr_client/models/patch_resources.rb +221 -0
  76. data/lib/ddr_client/models/patch_resources_metadata.rb +726 -0
  77. data/lib/ddr_client/models/patch_resources_related.rb +216 -0
  78. data/lib/ddr_client/models/patch_resources_roles.rb +220 -0
  79. data/lib/ddr_client/models/post_resources.rb +265 -0
  80. data/lib/ddr_client/version.rb +15 -0
  81. data/lib/ddr_client.rb +74 -0
  82. data/spec/api/batch_objects_api_spec.rb +61 -0
  83. data/spec/api/batches_api_spec.rb +100 -0
  84. data/spec/api/events_api_spec.rb +64 -0
  85. data/spec/api/groups_api_spec.rb +46 -0
  86. data/spec/api/index_api_spec.rb +67 -0
  87. data/spec/api/queues_api_spec.rb +55 -0
  88. data/spec/api/reports_api_spec.rb +70 -0
  89. data/spec/api/resources_api_spec.rb +271 -0
  90. data/spec/api/schema_api_spec.rb +65 -0
  91. data/spec/api/users_api_spec.rb +64 -0
  92. data/spec/api_client_spec.rb +243 -0
  93. data/spec/configuration_spec.rb +42 -0
  94. data/spec/models/ddr_api_batch_entity_logfile_spec.rb +59 -0
  95. data/spec/models/ddr_api_batch_entity_spec.rb +137 -0
  96. data/spec/models/ddr_api_batch_object_attribute_entity_spec.rb +89 -0
  97. data/spec/models/ddr_api_batch_object_datastream_entity_spec.rb +95 -0
  98. data/spec/models/ddr_api_batch_object_entity_spec.rb +149 -0
  99. data/spec/models/ddr_api_batch_object_message_entity_spec.rb +71 -0
  100. data/spec/models/ddr_api_batch_object_relationship_entity_spec.rb +83 -0
  101. data/spec/models/ddr_api_batch_object_role_entity_spec.rb +83 -0
  102. data/spec/models/ddr_api_event_entity_spec.rb +103 -0
  103. data/spec/models/ddr_api_file_entity_spec.rb +59 -0
  104. data/spec/models/ddr_api_group_entity_spec.rb +53 -0
  105. data/spec/models/ddr_api_group_member_entity_spec.rb +53 -0
  106. data/spec/models/ddr_api_link_entity_spec.rb +47 -0
  107. data/spec/models/ddr_api_resource_entity_files_spec.rb +95 -0
  108. data/spec/models/ddr_api_resource_entity_metadata_spec.rb +389 -0
  109. data/spec/models/ddr_api_resource_entity_related_spec.rb +59 -0
  110. data/spec/models/ddr_api_resource_entity_spec.rb +99 -0
  111. data/spec/models/ddr_api_role_entity_spec.rb +61 -0
  112. data/spec/models/ddr_api_technical_metadata_entity_spec.rb +137 -0
  113. data/spec/models/ddr_api_user_entity_spec.rb +107 -0
  114. data/spec/models/patch_resources_metadata_spec.rb +365 -0
  115. data/spec/models/patch_resources_related_spec.rb +59 -0
  116. data/spec/models/patch_resources_roles_spec.rb +53 -0
  117. data/spec/models/patch_resources_spec.rb +59 -0
  118. data/spec/models/post_resources_spec.rb +69 -0
  119. data/spec/spec_helper.rb +111 -0
  120. metadata +399 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: bf12271ce3a97053bb5f98322585a86262405689db002cbcb3a883650dc1eaeb
4
+ data.tar.gz: c500c94ad43b8649b105bc8665eaf9e1b98adb59efdd7dce90fd6956651d862c
5
+ SHA512:
6
+ metadata.gz: 432da4960f7ddebded707a024eade13a93ea186a65a05f62b818327e747ad5240488f965d89d38ba8f90c2e6a2f5fa1d20b97ad688efb992a44fea8146f2c2e5
7
+ data.tar.gz: 0f7efe1af2615cf553865d29c29b59f5d28ab2cd5ea3678930e1895933a6ca29e4c56fd781436e690540c40b950bfa0e27871f8974210e9435006cd90b20eb52
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.3.3'
7
+ end
data/README.md ADDED
@@ -0,0 +1,168 @@
1
+ # ddr_client
2
+
3
+ DdrClient - the Ruby gem for the Duke Digital Repository API
4
+
5
+ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
6
+
7
+ This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
+
9
+ - API version: v1
10
+ - Package version: 2.0.0.d9f2bd2b
11
+ - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
+
13
+ ## Installation
14
+
15
+ ### Build a gem
16
+
17
+ To build the Ruby code into a gem:
18
+
19
+ ```shell
20
+ gem build ddr_client.gemspec
21
+ ```
22
+
23
+ Then either install the gem locally:
24
+
25
+ ```shell
26
+ gem install ./ddr_client-2.0.0.d9f2bd2b.gem
27
+ ```
28
+ (for development, run `gem install --dev ./ddr_client-2.0.0.d9f2bd2b.gem` to install the development dependencies)
29
+
30
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
+
32
+ Finally add this to the Gemfile:
33
+
34
+ gem 'ddr_client', '~> 2.0.0.d9f2bd2b'
35
+
36
+ ### Install from Git
37
+
38
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
39
+
40
+ gem 'ddr_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
41
+
42
+ ### Include the Ruby code directly
43
+
44
+ Include the Ruby code directly using `-I` as follows:
45
+
46
+ ```shell
47
+ ruby -Ilib script.rb
48
+ ```
49
+
50
+ ## Getting Started
51
+
52
+ Please follow the [installation](#installation) procedure and then run the following code:
53
+ ```ruby
54
+ # Load the gem
55
+ require 'ddr_client'
56
+
57
+ # Setup authorization
58
+ DdrClient.configure do |config|
59
+ # Configure API key authorization: oauth
60
+ config.api_key['Authorization'] = 'YOUR API KEY'
61
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
62
+ #config.api_key_prefix['Authorization'] = 'Bearer'
63
+ end
64
+
65
+ api_instance = DdrClient::BatchObjectsApi.new
66
+
67
+ opts = {
68
+ resource_id: 'resource_id_example', # String | Filter by resource ID
69
+ type: 'type_example', # String | Filter by batch object type
70
+ model: ['model_example'], # Array<String> | Filter by models(s)
71
+ per_page: nil, # Object | JSON only: Number of records to return per page (default: 20)
72
+ page: nil # Object | JSON only: Page number of results to return (default: 1)
73
+ }
74
+
75
+ begin
76
+ result = api_instance.get_batch_objects(opts)
77
+ p result
78
+ rescue DdrClient::ApiError => e
79
+ puts "Exception when calling BatchObjectsApi->get_batch_objects: #{e}"
80
+ end
81
+
82
+ ```
83
+
84
+ ## Documentation for API Endpoints
85
+
86
+ All URIs are relative to *https://example.org/api*
87
+
88
+ Class | Method | HTTP request | Description
89
+ ------------ | ------------- | ------------- | -------------
90
+ *DdrClient::BatchObjectsApi* | [**get_batch_objects**](docs/BatchObjectsApi.md#get_batch_objects) | **GET** /batch_objects |
91
+ *DdrClient::BatchObjectsApi* | [**get_batch_objects_id**](docs/BatchObjectsApi.md#get_batch_objects_id) | **GET** /batch_objects/{id} |
92
+ *DdrClient::BatchesApi* | [**get_batches**](docs/BatchesApi.md#get_batches) | **GET** /batches |
93
+ *DdrClient::BatchesApi* | [**get_batches_id**](docs/BatchesApi.md#get_batches_id) | **GET** /batches/{id} |
94
+ *DdrClient::BatchesApi* | [**get_batches_id_batch_objects**](docs/BatchesApi.md#get_batches_id_batch_objects) | **GET** /batches/{id}/batch_objects |
95
+ *DdrClient::BatchesApi* | [**get_batches_id_log**](docs/BatchesApi.md#get_batches_id_log) | **GET** /batches/{id}/log |
96
+ *DdrClient::BatchesApi* | [**get_batches_id_messages**](docs/BatchesApi.md#get_batches_id_messages) | **GET** /batches/{id}/messages |
97
+ *DdrClient::EventsApi* | [**get_events**](docs/EventsApi.md#get_events) | **GET** /events |
98
+ *DdrClient::EventsApi* | [**get_events_id**](docs/EventsApi.md#get_events_id) | **GET** /events/{id} |
99
+ *DdrClient::GroupsApi* | [**get_groups**](docs/GroupsApi.md#get_groups) | **GET** /groups |
100
+ *DdrClient::IndexApi* | [**delete_index_id**](docs/IndexApi.md#delete_index_id) | **DELETE** /index/{id} |
101
+ *DdrClient::IndexApi* | [**get_index_id**](docs/IndexApi.md#get_index_id) | **GET** /index/{id} |
102
+ *DdrClient::IndexApi* | [**get_index_schema**](docs/IndexApi.md#get_index_schema) | **GET** /index/schema |
103
+ *DdrClient::QueuesApi* | [**delete_queues_locks**](docs/QueuesApi.md#delete_queues_locks) | **DELETE** /queues/locks |
104
+ *DdrClient::QueuesApi* | [**get_queues_stats**](docs/QueuesApi.md#get_queues_stats) | **GET** /queues/stats |
105
+ *DdrClient::ReportsApi* | [**get_reports_collection_summary**](docs/ReportsApi.md#get_reports_collection_summary) | **GET** /reports/collection_summary |
106
+ *DdrClient::ReportsApi* | [**get_reports_duplicate_content**](docs/ReportsApi.md#get_reports_duplicate_content) | **GET** /reports/duplicate_content |
107
+ *DdrClient::ReportsApi* | [**get_reports_roles**](docs/ReportsApi.md#get_reports_roles) | **GET** /reports/roles |
108
+ *DdrClient::ResourcesApi* | [**get_resources**](docs/ResourcesApi.md#get_resources) | **GET** /resources |
109
+ *DdrClient::ResourcesApi* | [**get_resources_by_role**](docs/ResourcesApi.md#get_resources_by_role) | **GET** /resources/by_role |
110
+ *DdrClient::ResourcesApi* | [**get_resources_id**](docs/ResourcesApi.md#get_resources_id) | **GET** /resources/{id} |
111
+ *DdrClient::ResourcesApi* | [**get_resources_id_attachments**](docs/ResourcesApi.md#get_resources_id_attachments) | **GET** /resources/{id}/attachments |
112
+ *DdrClient::ResourcesApi* | [**get_resources_id_batches**](docs/ResourcesApi.md#get_resources_id_batches) | **GET** /resources/{id}/batches |
113
+ *DdrClient::ResourcesApi* | [**get_resources_id_children**](docs/ResourcesApi.md#get_resources_id_children) | **GET** /resources/{id}/children |
114
+ *DdrClient::ResourcesApi* | [**get_resources_id_download**](docs/ResourcesApi.md#get_resources_id_download) | **GET** /resources/{id}/download |
115
+ *DdrClient::ResourcesApi* | [**get_resources_id_files_slug**](docs/ResourcesApi.md#get_resources_id_files_slug) | **GET** /resources/{id}/files/{slug} |
116
+ *DdrClient::ResourcesApi* | [**get_resources_id_fixity**](docs/ResourcesApi.md#get_resources_id_fixity) | **GET** /resources/{id}/fixity | Perform a fixity check on the resource
117
+ *DdrClient::ResourcesApi* | [**get_resources_id_members**](docs/ResourcesApi.md#get_resources_id_members) | **GET** /resources/{id}/members | Get members of a Collection
118
+ *DdrClient::ResourcesApi* | [**get_resources_id_permanent_id**](docs/ResourcesApi.md#get_resources_id_permanent_id) | **GET** /resources/{id}/permanent_id |
119
+ *DdrClient::ResourcesApi* | [**get_resources_id_permissions**](docs/ResourcesApi.md#get_resources_id_permissions) | **GET** /resources/{id}/permissions |
120
+ *DdrClient::ResourcesApi* | [**get_resources_id_targets**](docs/ResourcesApi.md#get_resources_id_targets) | **GET** /resources/{id}/targets |
121
+ *DdrClient::ResourcesApi* | [**get_resources_id_technical_metadata**](docs/ResourcesApi.md#get_resources_id_technical_metadata) | **GET** /resources/{id}/technical_metadata |
122
+ *DdrClient::ResourcesApi* | [**patch_resources_id**](docs/ResourcesApi.md#patch_resources_id) | **PATCH** /resources/{id} |
123
+ *DdrClient::ResourcesApi* | [**post_resources**](docs/ResourcesApi.md#post_resources) | **POST** /resources |
124
+ *DdrClient::SchemaApi* | [**get_schema_event**](docs/SchemaApi.md#get_schema_event) | **GET** /schema/event |
125
+ *DdrClient::SchemaApi* | [**get_schema_resource**](docs/SchemaApi.md#get_schema_resource) | **GET** /schema/resource |
126
+ *DdrClient::SchemaApi* | [**get_schema_user**](docs/SchemaApi.md#get_schema_user) | **GET** /schema/user |
127
+ *DdrClient::UsersApi* | [**get_users**](docs/UsersApi.md#get_users) | **GET** /users |
128
+ *DdrClient::UsersApi* | [**get_users_id**](docs/UsersApi.md#get_users_id) | **GET** /users/{id} |
129
+
130
+
131
+ ## Documentation for Models
132
+
133
+ - [DdrClient::DdrAPIBatchEntity](docs/DdrAPIBatchEntity.md)
134
+ - [DdrClient::DdrAPIBatchEntityLogfile](docs/DdrAPIBatchEntityLogfile.md)
135
+ - [DdrClient::DdrAPIBatchObjectAttributeEntity](docs/DdrAPIBatchObjectAttributeEntity.md)
136
+ - [DdrClient::DdrAPIBatchObjectDatastreamEntity](docs/DdrAPIBatchObjectDatastreamEntity.md)
137
+ - [DdrClient::DdrAPIBatchObjectEntity](docs/DdrAPIBatchObjectEntity.md)
138
+ - [DdrClient::DdrAPIBatchObjectMessageEntity](docs/DdrAPIBatchObjectMessageEntity.md)
139
+ - [DdrClient::DdrAPIBatchObjectRelationshipEntity](docs/DdrAPIBatchObjectRelationshipEntity.md)
140
+ - [DdrClient::DdrAPIBatchObjectRoleEntity](docs/DdrAPIBatchObjectRoleEntity.md)
141
+ - [DdrClient::DdrAPIEventEntity](docs/DdrAPIEventEntity.md)
142
+ - [DdrClient::DdrAPIFileEntity](docs/DdrAPIFileEntity.md)
143
+ - [DdrClient::DdrAPIGroupEntity](docs/DdrAPIGroupEntity.md)
144
+ - [DdrClient::DdrAPIGroupMemberEntity](docs/DdrAPIGroupMemberEntity.md)
145
+ - [DdrClient::DdrAPILinkEntity](docs/DdrAPILinkEntity.md)
146
+ - [DdrClient::DdrAPIResourceEntity](docs/DdrAPIResourceEntity.md)
147
+ - [DdrClient::DdrAPIResourceEntityFiles](docs/DdrAPIResourceEntityFiles.md)
148
+ - [DdrClient::DdrAPIResourceEntityMetadata](docs/DdrAPIResourceEntityMetadata.md)
149
+ - [DdrClient::DdrAPIResourceEntityRelated](docs/DdrAPIResourceEntityRelated.md)
150
+ - [DdrClient::DdrAPIRoleEntity](docs/DdrAPIRoleEntity.md)
151
+ - [DdrClient::DdrAPITechnicalMetadataEntity](docs/DdrAPITechnicalMetadataEntity.md)
152
+ - [DdrClient::DdrAPIUserEntity](docs/DdrAPIUserEntity.md)
153
+ - [DdrClient::PatchResources](docs/PatchResources.md)
154
+ - [DdrClient::PatchResourcesMetadata](docs/PatchResourcesMetadata.md)
155
+ - [DdrClient::PatchResourcesRelated](docs/PatchResourcesRelated.md)
156
+ - [DdrClient::PatchResourcesRoles](docs/PatchResourcesRoles.md)
157
+ - [DdrClient::PostResources](docs/PostResources.md)
158
+
159
+
160
+ ## Documentation for Authorization
161
+
162
+
163
+ ### oauth
164
+
165
+ - **Type**: API key
166
+ - **API key parameter name**: Authorization
167
+ - **Location**: HTTP header
168
+
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -0,0 +1,46 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #Duke Digital Repository API
5
+
6
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
7
+
8
+ OpenAPI spec version: v1
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 2.4.36
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "ddr_client/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "ddr_client"
20
+ s.version = DdrClient::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["Duke University Libraries"]
23
+ s.email = ["david.chandek.stark@duke.edu"]
24
+ s.homepage = "https://gitlab.oit.duke.edu/ddr/ddr-admin"
25
+ s.summary = "Duke Digital Repository API client"
26
+ s.description = "Duke Digital Repository API client generated by swagger-codegen (https://github.com/swagger-api/swagger-codegen)"
27
+ s.license = 'BSD-3-Clause'
28
+ s.required_ruby_version = ">= 1.9"
29
+
30
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
32
+ s.add_runtime_dependency 'addressable', '~> 2.3', '>= 2.3.0'
33
+
34
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
35
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
36
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
37
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
38
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
39
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
40
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
41
+
42
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
43
+ s.test_files = `find spec/*`.split("\n")
44
+ s.executables = []
45
+ s.require_paths = ["lib"]
46
+ end
@@ -0,0 +1,125 @@
1
+ # DdrClient::BatchObjectsApi
2
+
3
+ All URIs are relative to *https://example.org/api*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_batch_objects**](BatchObjectsApi.md#get_batch_objects) | **GET** /batch_objects |
8
+ [**get_batch_objects_id**](BatchObjectsApi.md#get_batch_objects_id) | **GET** /batch_objects/{id} |
9
+
10
+
11
+ # **get_batch_objects**
12
+ > Array&lt;DdrAPIBatchObjectEntity&gt; get_batch_objects(opts)
13
+
14
+
15
+
16
+ Retrieve batch object records
17
+
18
+ ### Example
19
+ ```ruby
20
+ # load the gem
21
+ require 'ddr_client'
22
+ # setup authorization
23
+ DdrClient.configure do |config|
24
+ # Configure API key authorization: oauth
25
+ config.api_key['Authorization'] = 'YOUR API KEY'
26
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
27
+ #config.api_key_prefix['Authorization'] = 'Bearer'
28
+ end
29
+
30
+ api_instance = DdrClient::BatchObjectsApi.new
31
+
32
+ opts = {
33
+ resource_id: 'resource_id_example', # String | Filter by resource ID
34
+ type: 'type_example', # String | Filter by batch object type
35
+ model: ['model_example'], # Array<String> | Filter by models(s)
36
+ per_page: nil, # Object | JSON only: Number of records to return per page (default: 20)
37
+ page: nil # Object | JSON only: Page number of results to return (default: 1)
38
+ }
39
+
40
+ begin
41
+ result = api_instance.get_batch_objects(opts)
42
+ p result
43
+ rescue DdrClient::ApiError => e
44
+ puts "Exception when calling BatchObjectsApi->get_batch_objects: #{e}"
45
+ end
46
+ ```
47
+
48
+ ### Parameters
49
+
50
+ Name | Type | Description | Notes
51
+ ------------- | ------------- | ------------- | -------------
52
+ **resource_id** | **String**| Filter by resource ID | [optional]
53
+ **type** | **String**| Filter by batch object type | [optional]
54
+ **model** | [**Array&lt;String&gt;**](String.md)| Filter by models(s) | [optional]
55
+ **per_page** | [**Object**](.md)| JSON only: Number of records to return per page (default: 20) | [optional]
56
+ **page** | [**Object**](.md)| JSON only: Page number of results to return (default: 1) | [optional]
57
+
58
+ ### Return type
59
+
60
+ [**Array&lt;DdrAPIBatchObjectEntity&gt;**](DdrAPIBatchObjectEntity.md)
61
+
62
+ ### Authorization
63
+
64
+ [oauth](../README.md#oauth)
65
+
66
+ ### HTTP request headers
67
+
68
+ - **Content-Type**: Not defined
69
+ - **Accept**: application/json, text/csv
70
+
71
+
72
+
73
+ # **get_batch_objects_id**
74
+ > DdrAPIBatchObjectEntity get_batch_objects_id(id)
75
+
76
+
77
+
78
+ Retrieve a batch object record with details (attributes, files, messages, relationships, roles)
79
+
80
+ ### Example
81
+ ```ruby
82
+ # load the gem
83
+ require 'ddr_client'
84
+ # setup authorization
85
+ DdrClient.configure do |config|
86
+ # Configure API key authorization: oauth
87
+ config.api_key['Authorization'] = 'YOUR API KEY'
88
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
89
+ #config.api_key_prefix['Authorization'] = 'Bearer'
90
+ end
91
+
92
+ api_instance = DdrClient::BatchObjectsApi.new
93
+
94
+ id = 56 # Integer |
95
+
96
+
97
+ begin
98
+ result = api_instance.get_batch_objects_id(id)
99
+ p result
100
+ rescue DdrClient::ApiError => e
101
+ puts "Exception when calling BatchObjectsApi->get_batch_objects_id: #{e}"
102
+ end
103
+ ```
104
+
105
+ ### Parameters
106
+
107
+ Name | Type | Description | Notes
108
+ ------------- | ------------- | ------------- | -------------
109
+ **id** | **Integer**| |
110
+
111
+ ### Return type
112
+
113
+ [**DdrAPIBatchObjectEntity**](DdrAPIBatchObjectEntity.md)
114
+
115
+ ### Authorization
116
+
117
+ [oauth](../README.md#oauth)
118
+
119
+ ### HTTP request headers
120
+
121
+ - **Content-Type**: Not defined
122
+ - **Accept**: application/json
123
+
124
+
125
+
@@ -0,0 +1,305 @@
1
+ # DdrClient::BatchesApi
2
+
3
+ All URIs are relative to *https://example.org/api*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_batches**](BatchesApi.md#get_batches) | **GET** /batches |
8
+ [**get_batches_id**](BatchesApi.md#get_batches_id) | **GET** /batches/{id} |
9
+ [**get_batches_id_batch_objects**](BatchesApi.md#get_batches_id_batch_objects) | **GET** /batches/{id}/batch_objects |
10
+ [**get_batches_id_log**](BatchesApi.md#get_batches_id_log) | **GET** /batches/{id}/log |
11
+ [**get_batches_id_messages**](BatchesApi.md#get_batches_id_messages) | **GET** /batches/{id}/messages |
12
+
13
+
14
+ # **get_batches**
15
+ > Array&lt;DdrAPIBatchEntity&gt; get_batches(opts)
16
+
17
+
18
+
19
+ List batches
20
+
21
+ ### Example
22
+ ```ruby
23
+ # load the gem
24
+ require 'ddr_client'
25
+ # setup authorization
26
+ DdrClient.configure do |config|
27
+ # Configure API key authorization: oauth
28
+ config.api_key['Authorization'] = 'YOUR API KEY'
29
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
30
+ #config.api_key_prefix['Authorization'] = 'Bearer'
31
+ end
32
+
33
+ api_instance = DdrClient::BatchesApi.new
34
+
35
+ opts = {
36
+ outcome: 'outcome_example', # String | Filter by batch processing outcome
37
+ user_id: 56, # Integer | Filter by user ID associated with the batch
38
+ status: 'status_example', # String | Filter by batch status
39
+ per_page: nil, # Object | JSON only: Number of records to return per page (default: 20)
40
+ page: nil # Object | JSON only: Page number of results to return (default: 1)
41
+ }
42
+
43
+ begin
44
+ result = api_instance.get_batches(opts)
45
+ p result
46
+ rescue DdrClient::ApiError => e
47
+ puts "Exception when calling BatchesApi->get_batches: #{e}"
48
+ end
49
+ ```
50
+
51
+ ### Parameters
52
+
53
+ Name | Type | Description | Notes
54
+ ------------- | ------------- | ------------- | -------------
55
+ **outcome** | **String**| Filter by batch processing outcome | [optional]
56
+ **user_id** | **Integer**| Filter by user ID associated with the batch | [optional]
57
+ **status** | **String**| Filter by batch status | [optional]
58
+ **per_page** | [**Object**](.md)| JSON only: Number of records to return per page (default: 20) | [optional]
59
+ **page** | [**Object**](.md)| JSON only: Page number of results to return (default: 1) | [optional]
60
+
61
+ ### Return type
62
+
63
+ [**Array&lt;DdrAPIBatchEntity&gt;**](DdrAPIBatchEntity.md)
64
+
65
+ ### Authorization
66
+
67
+ [oauth](../README.md#oauth)
68
+
69
+ ### HTTP request headers
70
+
71
+ - **Content-Type**: Not defined
72
+ - **Accept**: application/json, text/csv
73
+
74
+
75
+
76
+ # **get_batches_id**
77
+ > DdrAPIBatchEntity get_batches_id(id, opts)
78
+
79
+
80
+
81
+ Retrieve a batch record
82
+
83
+ ### Example
84
+ ```ruby
85
+ # load the gem
86
+ require 'ddr_client'
87
+ # setup authorization
88
+ DdrClient.configure do |config|
89
+ # Configure API key authorization: oauth
90
+ config.api_key['Authorization'] = 'YOUR API KEY'
91
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
92
+ #config.api_key_prefix['Authorization'] = 'Bearer'
93
+ end
94
+
95
+ api_instance = DdrClient::BatchesApi.new
96
+
97
+ id = 56 # Integer |
98
+
99
+ opts = {
100
+ batch_objects: false # BOOLEAN | Include related batch objects (not paginated)
101
+ }
102
+
103
+ begin
104
+ result = api_instance.get_batches_id(id, opts)
105
+ p result
106
+ rescue DdrClient::ApiError => e
107
+ puts "Exception when calling BatchesApi->get_batches_id: #{e}"
108
+ end
109
+ ```
110
+
111
+ ### Parameters
112
+
113
+ Name | Type | Description | Notes
114
+ ------------- | ------------- | ------------- | -------------
115
+ **id** | **Integer**| |
116
+ **batch_objects** | **BOOLEAN**| Include related batch objects (not paginated) | [optional] [default to false]
117
+
118
+ ### Return type
119
+
120
+ [**DdrAPIBatchEntity**](DdrAPIBatchEntity.md)
121
+
122
+ ### Authorization
123
+
124
+ [oauth](../README.md#oauth)
125
+
126
+ ### HTTP request headers
127
+
128
+ - **Content-Type**: Not defined
129
+ - **Accept**: application/json
130
+
131
+
132
+
133
+ # **get_batches_id_batch_objects**
134
+ > Array&lt;DdrAPIBatchObjectEntity&gt; get_batches_id_batch_objects(id, opts)
135
+
136
+
137
+
138
+ Retrieve the batch objects for a batch
139
+
140
+ ### Example
141
+ ```ruby
142
+ # load the gem
143
+ require 'ddr_client'
144
+ # setup authorization
145
+ DdrClient.configure do |config|
146
+ # Configure API key authorization: oauth
147
+ config.api_key['Authorization'] = 'YOUR API KEY'
148
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
149
+ #config.api_key_prefix['Authorization'] = 'Bearer'
150
+ end
151
+
152
+ api_instance = DdrClient::BatchesApi.new
153
+
154
+ id = 56 # Integer |
155
+
156
+ opts = {
157
+ batch_object_details: true, # BOOLEAN | JSON only: Include related attributes, files, messages, relationships, and roles for each batch object
158
+ per_page: nil, # Object | JSON only: Number of records to return per page (default: 20)
159
+ page: nil # Object | JSON only: Page number of results to return (default: 1)
160
+ }
161
+
162
+ begin
163
+ result = api_instance.get_batches_id_batch_objects(id, opts)
164
+ p result
165
+ rescue DdrClient::ApiError => e
166
+ puts "Exception when calling BatchesApi->get_batches_id_batch_objects: #{e}"
167
+ end
168
+ ```
169
+
170
+ ### Parameters
171
+
172
+ Name | Type | Description | Notes
173
+ ------------- | ------------- | ------------- | -------------
174
+ **id** | **Integer**| |
175
+ **batch_object_details** | **BOOLEAN**| JSON only: Include related attributes, files, messages, relationships, and roles for each batch object | [optional] [default to true]
176
+ **per_page** | [**Object**](.md)| JSON only: Number of records to return per page (default: 20) | [optional]
177
+ **page** | [**Object**](.md)| JSON only: Page number of results to return (default: 1) | [optional]
178
+
179
+ ### Return type
180
+
181
+ [**Array&lt;DdrAPIBatchObjectEntity&gt;**](DdrAPIBatchObjectEntity.md)
182
+
183
+ ### Authorization
184
+
185
+ [oauth](../README.md#oauth)
186
+
187
+ ### HTTP request headers
188
+
189
+ - **Content-Type**: Not defined
190
+ - **Accept**: application/json, text/csv
191
+
192
+
193
+
194
+ # **get_batches_id_log**
195
+ > File get_batches_id_log(id)
196
+
197
+
198
+
199
+ Download the batch log file
200
+
201
+ ### Example
202
+ ```ruby
203
+ # load the gem
204
+ require 'ddr_client'
205
+ # setup authorization
206
+ DdrClient.configure do |config|
207
+ # Configure API key authorization: oauth
208
+ config.api_key['Authorization'] = 'YOUR API KEY'
209
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
210
+ #config.api_key_prefix['Authorization'] = 'Bearer'
211
+ end
212
+
213
+ api_instance = DdrClient::BatchesApi.new
214
+
215
+ id = 56 # Integer |
216
+
217
+
218
+ begin
219
+ result = api_instance.get_batches_id_log(id)
220
+ p result
221
+ rescue DdrClient::ApiError => e
222
+ puts "Exception when calling BatchesApi->get_batches_id_log: #{e}"
223
+ end
224
+ ```
225
+
226
+ ### Parameters
227
+
228
+ Name | Type | Description | Notes
229
+ ------------- | ------------- | ------------- | -------------
230
+ **id** | **Integer**| |
231
+
232
+ ### Return type
233
+
234
+ **File**
235
+
236
+ ### Authorization
237
+
238
+ [oauth](../README.md#oauth)
239
+
240
+ ### HTTP request headers
241
+
242
+ - **Content-Type**: Not defined
243
+ - **Accept**: text/plain
244
+
245
+
246
+
247
+ # **get_batches_id_messages**
248
+ > Array&lt;DdrAPIBatchObjectMessageEntity&gt; get_batches_id_messages(id, opts)
249
+
250
+
251
+
252
+ Retrieve the batch object messages for a batch
253
+
254
+ ### Example
255
+ ```ruby
256
+ # load the gem
257
+ require 'ddr_client'
258
+ # setup authorization
259
+ DdrClient.configure do |config|
260
+ # Configure API key authorization: oauth
261
+ config.api_key['Authorization'] = 'YOUR API KEY'
262
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
263
+ #config.api_key_prefix['Authorization'] = 'Bearer'
264
+ end
265
+
266
+ api_instance = DdrClient::BatchesApi.new
267
+
268
+ id = 56 # Integer |
269
+
270
+ opts = {
271
+ per_page: nil, # Object | JSON only: Number of records to return per page (default: 20)
272
+ page: nil # Object | JSON only: Page number of results to return (default: 1)
273
+ }
274
+
275
+ begin
276
+ result = api_instance.get_batches_id_messages(id, opts)
277
+ p result
278
+ rescue DdrClient::ApiError => e
279
+ puts "Exception when calling BatchesApi->get_batches_id_messages: #{e}"
280
+ end
281
+ ```
282
+
283
+ ### Parameters
284
+
285
+ Name | Type | Description | Notes
286
+ ------------- | ------------- | ------------- | -------------
287
+ **id** | **Integer**| |
288
+ **per_page** | [**Object**](.md)| JSON only: Number of records to return per page (default: 20) | [optional]
289
+ **page** | [**Object**](.md)| JSON only: Page number of results to return (default: 1) | [optional]
290
+
291
+ ### Return type
292
+
293
+ [**Array&lt;DdrAPIBatchObjectMessageEntity&gt;**](DdrAPIBatchObjectMessageEntity.md)
294
+
295
+ ### Authorization
296
+
297
+ [oauth](../README.md#oauth)
298
+
299
+ ### HTTP request headers
300
+
301
+ - **Content-Type**: Not defined
302
+ - **Accept**: application/json, text/csv
303
+
304
+
305
+