metatron_ruby_client 0.0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +28 -28
- data/config.json +1 -1
- data/docs/Asset.md +1 -1
- data/docs/AssetResultSet.md +1 -1
- data/docs/DefaultApi.md +159 -145
- data/docs/WorkAttributes.md +3 -1
- data/lib/metatron_ruby_client.rb +8 -3
- data/lib/metatron_ruby_client/api/default_api.rb +439 -241
- data/lib/metatron_ruby_client/api_client.rb +6 -2
- data/lib/metatron_ruby_client/api_error.rb +4 -2
- data/lib/metatron_ruby_client/configuration.rb +3 -3
- data/lib/metatron_ruby_client/models/asset.rb +45 -3
- data/lib/metatron_ruby_client/models/asset_data.rb +61 -2
- data/lib/metatron_ruby_client/models/asset_meta.rb +23 -0
- data/lib/metatron_ruby_client/models/asset_result_set.rb +60 -3
- data/lib/metatron_ruby_client/models/error.rb +61 -2
- data/lib/metatron_ruby_client/models/errors.rb +27 -2
- data/lib/metatron_ruby_client/models/item.rb +40 -0
- data/lib/metatron_ruby_client/models/item_data.rb +28 -2
- data/lib/metatron_ruby_client/models/item_result_set.rb +60 -2
- data/lib/metatron_ruby_client/models/links.rb +60 -2
- data/lib/metatron_ruby_client/models/manifestation.rb +40 -0
- data/lib/metatron_ruby_client/models/manifestation_attributes.rb +75 -2
- data/lib/metatron_ruby_client/models/manifestation_data.rb +78 -2
- data/lib/metatron_ruby_client/models/manifestation_relationships.rb +59 -2
- data/lib/metatron_ruby_client/models/manifestation_result_set.rb +62 -2
- data/lib/metatron_ruby_client/models/one_to_many_relationship.rb +60 -2
- data/lib/metatron_ruby_client/models/one_to_one_relationship.rb +60 -2
- data/lib/metatron_ruby_client/models/resource_data.rb +78 -2
- data/lib/metatron_ruby_client/models/resource_link.rb +45 -2
- data/lib/metatron_ruby_client/models/result_set_meta.rb +59 -2
- data/lib/metatron_ruby_client/models/work.rb +40 -0
- data/lib/metatron_ruby_client/models/work_attributes.rb +90 -10
- data/lib/metatron_ruby_client/models/work_data.rb +78 -2
- data/lib/metatron_ruby_client/models/work_relationships.rb +27 -2
- data/lib/metatron_ruby_client/models/work_result_set.rb +75 -2
- data/lib/metatron_ruby_client/version.rb +5 -3
- data/metatron_ruby_client-0.0.1.gem +0 -0
- data/spec/api/default_api_spec.rb +11 -0
- data/spec/models/work_attributes_spec.rb +21 -1
- data/stub-service/.idea/.name +1 -0
- data/stub-service/.idea/encodings.xml +5 -0
- data/stub-service/.idea/metatron-dummy-server.iml +11 -0
- data/stub-service/.idea/misc.xml +5 -0
- data/stub-service/.idea/modules.xml +9 -0
- data/stub-service/.idea/scopes/scope_settings.xml +5 -0
- data/stub-service/.idea/vcs.xml +7 -0
- data/stub-service/.idea/workspace.xml +534 -0
- metadata +32 -24
- data/swagger-codegen-cli.jar +0 -0
data/docs/WorkAttributes.md
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**
|
6
|
+
**titles** | **String** | |
|
7
|
+
**authors** | **Array<String>** | | [optional]
|
8
|
+
**isbns** | **Array<String>** | | [optional]
|
7
9
|
|
8
10
|
|
data/lib/metatron_ruby_client.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
|
2
|
+
Metatron Server
|
3
3
|
|
4
|
-
|
4
|
+
A primitive modelling bibliographic metadata
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
5
7
|
|
6
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
7
9
|
|
@@ -17,13 +19,15 @@ require 'metatron_ruby_client/configuration'
|
|
17
19
|
# Models
|
18
20
|
require 'metatron_ruby_client/models/asset'
|
19
21
|
require 'metatron_ruby_client/models/asset_data'
|
22
|
+
require 'metatron_ruby_client/models/asset_meta'
|
20
23
|
require 'metatron_ruby_client/models/asset_result_set'
|
21
|
-
require 'metatron_ruby_client/models/asset_result_set_meta'
|
22
24
|
require 'metatron_ruby_client/models/error'
|
23
25
|
require 'metatron_ruby_client/models/errors'
|
26
|
+
require 'metatron_ruby_client/models/item'
|
24
27
|
require 'metatron_ruby_client/models/item_data'
|
25
28
|
require 'metatron_ruby_client/models/item_result_set'
|
26
29
|
require 'metatron_ruby_client/models/links'
|
30
|
+
require 'metatron_ruby_client/models/manifestation'
|
27
31
|
require 'metatron_ruby_client/models/manifestation_attributes'
|
28
32
|
require 'metatron_ruby_client/models/manifestation_data'
|
29
33
|
require 'metatron_ruby_client/models/manifestation_relationships'
|
@@ -33,6 +37,7 @@ require 'metatron_ruby_client/models/one_to_one_relationship'
|
|
33
37
|
require 'metatron_ruby_client/models/resource_data'
|
34
38
|
require 'metatron_ruby_client/models/resource_link'
|
35
39
|
require 'metatron_ruby_client/models/result_set_meta'
|
40
|
+
require 'metatron_ruby_client/models/work'
|
36
41
|
require 'metatron_ruby_client/models/work_attributes'
|
37
42
|
require 'metatron_ruby_client/models/work_data'
|
38
43
|
require 'metatron_ruby_client/models/work_relationships'
|
@@ -1,7 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
|
2
|
+
Metatron Server
|
3
3
|
|
4
|
-
|
4
|
+
A primitive modelling bibliographic metadata
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
5
7
|
|
6
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
7
9
|
|
@@ -19,36 +21,55 @@ module MetatronClient
|
|
19
21
|
end
|
20
22
|
|
21
23
|
#
|
22
|
-
#
|
23
|
-
# @param
|
24
|
-
# @param
|
25
|
-
# @param
|
24
|
+
# Add an asset to the relevant manifestation
|
25
|
+
# @param authorization Bearer token
|
26
|
+
# @param manifestation_id
|
27
|
+
# @param body node
|
26
28
|
# @param [Hash] opts the optional parameters
|
27
|
-
# @return [
|
28
|
-
def
|
29
|
-
|
30
|
-
return
|
29
|
+
# @return [Asset]
|
30
|
+
def add_manifestation_asset(authorization, manifestation_id, body, opts = {})
|
31
|
+
data, _status_code, _headers = add_manifestation_asset_with_http_info(authorization, manifestation_id, body, opts)
|
32
|
+
return data
|
31
33
|
end
|
32
34
|
|
33
35
|
#
|
34
|
-
#
|
35
|
-
# @param
|
36
|
-
# @param
|
37
|
-
# @param
|
36
|
+
# Add an asset to the relevant manifestation
|
37
|
+
# @param authorization Bearer token
|
38
|
+
# @param manifestation_id
|
39
|
+
# @param body node
|
38
40
|
# @param [Hash] opts the optional parameters
|
39
|
-
# @return [Array<(
|
40
|
-
def
|
41
|
+
# @return [Array<(Asset, Fixnum, Hash)>] Asset data, response status code and response headers
|
42
|
+
def add_manifestation_asset_with_http_info(authorization, manifestation_id, body, opts = {})
|
41
43
|
if @api_client.config.debugging
|
42
|
-
@api_client.config.logger.debug "Calling API: DefaultApi.
|
44
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.add_manifestation_asset ..."
|
43
45
|
end
|
44
|
-
|
45
|
-
|
46
|
-
# verify the required parameter 'asset_type' is set
|
47
|
-
fail ArgumentError, "Missing the required parameter 'asset_type' when calling DefaultApi.assets_asset_type_asset_id_delete" if asset_type.nil?
|
46
|
+
|
47
|
+
|
48
48
|
# verify the required parameter 'authorization' is set
|
49
|
-
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.
|
49
|
+
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.add_manifestation_asset" if authorization.nil?
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
# verify the required parameter 'manifestation_id' is set
|
57
|
+
fail ArgumentError, "Missing the required parameter 'manifestation_id' when calling DefaultApi.add_manifestation_asset" if manifestation_id.nil?
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
# verify the required parameter 'body' is set
|
65
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling DefaultApi.add_manifestation_asset" if body.nil?
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
|
50
71
|
# resource path
|
51
|
-
local_var_path = "/
|
72
|
+
local_var_path = "/manifestations/{manifestationId}/assets".sub('{format}','json').sub('{' + 'manifestationId' + '}', manifestation_id.to_s)
|
52
73
|
|
53
74
|
# query parameters
|
54
75
|
query_params = {}
|
@@ -57,7 +78,7 @@ module MetatronClient
|
|
57
78
|
header_params = {}
|
58
79
|
|
59
80
|
# HTTP header 'Accept' (if needed)
|
60
|
-
local_header_accept = ['application/vnd.api+json'
|
81
|
+
local_header_accept = ['application/vnd.api+json']
|
61
82
|
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
62
83
|
|
63
84
|
# HTTP header 'Content-Type'
|
@@ -69,58 +90,81 @@ module MetatronClient
|
|
69
90
|
form_params = {}
|
70
91
|
|
71
92
|
# http body (model)
|
72
|
-
post_body =
|
73
|
-
|
74
|
-
|
93
|
+
post_body = @api_client.object_to_http_body(body)
|
94
|
+
|
95
|
+
auth_names = ['Authorizer']
|
96
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
75
97
|
:header_params => header_params,
|
76
98
|
:query_params => query_params,
|
77
99
|
:form_params => form_params,
|
78
100
|
:body => post_body,
|
79
|
-
:auth_names => auth_names
|
101
|
+
:auth_names => auth_names,
|
102
|
+
:return_type => 'Asset')
|
80
103
|
if @api_client.config.debugging
|
81
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
104
|
+
@api_client.config.logger.debug "API called: DefaultApi#add_manifestation_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
105
|
end
|
83
106
|
return data, status_code, headers
|
84
107
|
end
|
85
108
|
|
109
|
+
# Get local holdings for a given manifestation
|
86
110
|
#
|
87
|
-
#
|
88
|
-
# @param
|
111
|
+
# @param authorization Bearer token
|
112
|
+
# @param manifestation_id
|
113
|
+
# @param tenant_code
|
89
114
|
# @param [Hash] opts the optional parameters
|
90
|
-
# @
|
91
|
-
|
92
|
-
|
93
|
-
def manifestations_get(authorization, opts = {})
|
94
|
-
data, _status_code, _headers = manifestations_get_with_http_info(authorization, opts)
|
115
|
+
# @return [ItemResultSet]
|
116
|
+
def get_holdings(authorization, manifestation_id, tenant_code, opts = {})
|
117
|
+
data, _status_code, _headers = get_holdings_with_http_info(authorization, manifestation_id, tenant_code, opts)
|
95
118
|
return data
|
96
119
|
end
|
97
120
|
|
121
|
+
# Get local holdings for a given manifestation
|
98
122
|
#
|
99
|
-
#
|
100
|
-
# @param
|
123
|
+
# @param authorization Bearer token
|
124
|
+
# @param manifestation_id
|
125
|
+
# @param tenant_code
|
101
126
|
# @param [Hash] opts the optional parameters
|
102
|
-
# @
|
103
|
-
|
104
|
-
# @return [Array<(ManifestationResultSet, Fixnum, Hash)>] ManifestationResultSet data, response status code and response headers
|
105
|
-
def manifestations_get_with_http_info(authorization, opts = {})
|
127
|
+
# @return [Array<(ItemResultSet, Fixnum, Hash)>] ItemResultSet data, response status code and response headers
|
128
|
+
def get_holdings_with_http_info(authorization, manifestation_id, tenant_code, opts = {})
|
106
129
|
if @api_client.config.debugging
|
107
|
-
@api_client.config.logger.debug "Calling API: DefaultApi.
|
130
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.get_holdings ..."
|
108
131
|
end
|
132
|
+
|
133
|
+
|
109
134
|
# verify the required parameter 'authorization' is set
|
110
|
-
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.
|
135
|
+
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_holdings" if authorization.nil?
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
# verify the required parameter 'manifestation_id' is set
|
143
|
+
fail ArgumentError, "Missing the required parameter 'manifestation_id' when calling DefaultApi.get_holdings" if manifestation_id.nil?
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
# verify the required parameter 'tenant_code' is set
|
151
|
+
fail ArgumentError, "Missing the required parameter 'tenant_code' when calling DefaultApi.get_holdings" if tenant_code.nil?
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
111
157
|
# resource path
|
112
|
-
local_var_path = "/
|
158
|
+
local_var_path = "/manifestations/{manifestationId}/items/{tenantCode}".sub('{format}','json').sub('{' + 'manifestationId' + '}', manifestation_id.to_s).sub('{' + 'tenantCode' + '}', tenant_code.to_s)
|
113
159
|
|
114
160
|
# query parameters
|
115
161
|
query_params = {}
|
116
|
-
query_params[:'work_id'] = opts[:'work_id'] if opts[:'work_id']
|
117
|
-
query_params[:'isbn'] = opts[:'isbn'] if opts[:'isbn']
|
118
162
|
|
119
163
|
# header parameters
|
120
164
|
header_params = {}
|
121
165
|
|
122
166
|
# HTTP header 'Accept' (if needed)
|
123
|
-
local_header_accept = ['application/vnd.api+json'
|
167
|
+
local_header_accept = ['application/vnd.api+json']
|
124
168
|
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
125
169
|
|
126
170
|
# HTTP header 'Content-Type'
|
@@ -133,47 +177,61 @@ module MetatronClient
|
|
133
177
|
|
134
178
|
# http body (model)
|
135
179
|
post_body = nil
|
136
|
-
|
180
|
+
|
181
|
+
auth_names = ['Authorizer']
|
137
182
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
138
183
|
:header_params => header_params,
|
139
184
|
:query_params => query_params,
|
140
185
|
:form_params => form_params,
|
141
186
|
:body => post_body,
|
142
187
|
:auth_names => auth_names,
|
143
|
-
:return_type => '
|
188
|
+
:return_type => 'ItemResultSet')
|
144
189
|
if @api_client.config.debugging
|
145
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
190
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_holdings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
146
191
|
end
|
147
192
|
return data, status_code, headers
|
148
193
|
end
|
149
194
|
|
195
|
+
# Get a specific Manifestation from the dataset
|
150
196
|
#
|
151
|
-
#
|
197
|
+
# @param authorization Bearer token
|
152
198
|
# @param manifestation_id
|
153
|
-
# @param authorization
|
154
199
|
# @param [Hash] opts the optional parameters
|
155
|
-
# @return [
|
156
|
-
def
|
157
|
-
|
158
|
-
return
|
200
|
+
# @return [nil]
|
201
|
+
def get_manifestation(authorization, manifestation_id, opts = {})
|
202
|
+
get_manifestation_with_http_info(authorization, manifestation_id, opts)
|
203
|
+
return nil
|
159
204
|
end
|
160
205
|
|
206
|
+
# Get a specific Manifestation from the dataset
|
161
207
|
#
|
162
|
-
#
|
208
|
+
# @param authorization Bearer token
|
163
209
|
# @param manifestation_id
|
164
|
-
# @param authorization
|
165
210
|
# @param [Hash] opts the optional parameters
|
166
|
-
# @return [Array<(
|
167
|
-
def
|
211
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
212
|
+
def get_manifestation_with_http_info(authorization, manifestation_id, opts = {})
|
168
213
|
if @api_client.config.debugging
|
169
|
-
@api_client.config.logger.debug "Calling API: DefaultApi.
|
214
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.get_manifestation ..."
|
170
215
|
end
|
171
|
-
|
172
|
-
|
216
|
+
|
217
|
+
|
173
218
|
# verify the required parameter 'authorization' is set
|
174
|
-
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.
|
219
|
+
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_manifestation" if authorization.nil?
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
# verify the required parameter 'manifestation_id' is set
|
227
|
+
fail ArgumentError, "Missing the required parameter 'manifestation_id' when calling DefaultApi.get_manifestation" if manifestation_id.nil?
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
175
233
|
# resource path
|
176
|
-
local_var_path = "/
|
234
|
+
local_var_path = "/manifestations/{manifestationId}".sub('{format}','json').sub('{' + 'manifestationId' + '}', manifestation_id.to_s)
|
177
235
|
|
178
236
|
# query parameters
|
179
237
|
query_params = {}
|
@@ -182,7 +240,7 @@ module MetatronClient
|
|
182
240
|
header_params = {}
|
183
241
|
|
184
242
|
# HTTP header 'Accept' (if needed)
|
185
|
-
local_header_accept = ['application/vnd.api+json'
|
243
|
+
local_header_accept = ['application/vnd.api+json']
|
186
244
|
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
187
245
|
|
188
246
|
# HTTP header 'Content-Type'
|
@@ -195,51 +253,60 @@ module MetatronClient
|
|
195
253
|
|
196
254
|
# http body (model)
|
197
255
|
post_body = nil
|
198
|
-
|
256
|
+
|
257
|
+
auth_names = ['Authorizer']
|
199
258
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
200
259
|
:header_params => header_params,
|
201
260
|
:query_params => query_params,
|
202
261
|
:form_params => form_params,
|
203
262
|
:body => post_body,
|
204
|
-
:auth_names => auth_names
|
205
|
-
:return_type => 'AssetResultSet')
|
263
|
+
:auth_names => auth_names)
|
206
264
|
if @api_client.config.debugging
|
207
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
265
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_manifestation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
208
266
|
end
|
209
267
|
return data, status_code, headers
|
210
268
|
end
|
211
269
|
|
270
|
+
# Get a set of Assets that are associated with a specific Manifestation
|
212
271
|
#
|
213
|
-
#
|
272
|
+
# @param authorization Bearer token
|
214
273
|
# @param manifestation_id
|
215
|
-
# @param authorization
|
216
|
-
# @param asset
|
217
274
|
# @param [Hash] opts the optional parameters
|
218
|
-
# @return [
|
219
|
-
def
|
220
|
-
data, _status_code, _headers =
|
275
|
+
# @return [AssetResultSet]
|
276
|
+
def get_manifestation_assets(authorization, manifestation_id, opts = {})
|
277
|
+
data, _status_code, _headers = get_manifestation_assets_with_http_info(authorization, manifestation_id, opts)
|
221
278
|
return data
|
222
279
|
end
|
223
280
|
|
281
|
+
# Get a set of Assets that are associated with a specific Manifestation
|
224
282
|
#
|
225
|
-
#
|
283
|
+
# @param authorization Bearer token
|
226
284
|
# @param manifestation_id
|
227
|
-
# @param authorization
|
228
|
-
# @param asset
|
229
285
|
# @param [Hash] opts the optional parameters
|
230
|
-
# @return [Array<(
|
231
|
-
def
|
286
|
+
# @return [Array<(AssetResultSet, Fixnum, Hash)>] AssetResultSet data, response status code and response headers
|
287
|
+
def get_manifestation_assets_with_http_info(authorization, manifestation_id, opts = {})
|
232
288
|
if @api_client.config.debugging
|
233
|
-
@api_client.config.logger.debug "Calling API: DefaultApi.
|
289
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.get_manifestation_assets ..."
|
234
290
|
end
|
235
|
-
|
236
|
-
|
291
|
+
|
292
|
+
|
237
293
|
# verify the required parameter 'authorization' is set
|
238
|
-
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.
|
239
|
-
|
240
|
-
|
294
|
+
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_manifestation_assets" if authorization.nil?
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
# verify the required parameter 'manifestation_id' is set
|
302
|
+
fail ArgumentError, "Missing the required parameter 'manifestation_id' when calling DefaultApi.get_manifestation_assets" if manifestation_id.nil?
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
241
308
|
# resource path
|
242
|
-
local_var_path = "/
|
309
|
+
local_var_path = "/manifestations/{manifestationId}/assets".sub('{format}','json').sub('{' + 'manifestationId' + '}', manifestation_id.to_s)
|
243
310
|
|
244
311
|
# query parameters
|
245
312
|
query_params = {}
|
@@ -248,11 +315,11 @@ module MetatronClient
|
|
248
315
|
header_params = {}
|
249
316
|
|
250
317
|
# HTTP header 'Accept' (if needed)
|
251
|
-
local_header_accept = ['application/vnd.api+json'
|
318
|
+
local_header_accept = ['application/vnd.api+json']
|
252
319
|
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
253
320
|
|
254
321
|
# HTTP header 'Content-Type'
|
255
|
-
local_header_content_type = ['application/
|
322
|
+
local_header_content_type = ['application/json']
|
256
323
|
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
257
324
|
header_params[:'Authorization'] = authorization
|
258
325
|
|
@@ -260,48 +327,62 @@ module MetatronClient
|
|
260
327
|
form_params = {}
|
261
328
|
|
262
329
|
# http body (model)
|
263
|
-
post_body =
|
330
|
+
post_body = nil
|
331
|
+
|
264
332
|
auth_names = ['Authorizer']
|
265
|
-
data, status_code, headers = @api_client.call_api(:
|
333
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
266
334
|
:header_params => header_params,
|
267
335
|
:query_params => query_params,
|
268
336
|
:form_params => form_params,
|
269
337
|
:body => post_body,
|
270
338
|
:auth_names => auth_names,
|
271
|
-
:return_type => '
|
339
|
+
:return_type => 'AssetResultSet')
|
272
340
|
if @api_client.config.debugging
|
273
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
341
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_manifestation_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
274
342
|
end
|
275
343
|
return data, status_code, headers
|
276
344
|
end
|
277
345
|
|
346
|
+
# Get a set of Works relating to a given Manifestation. Usually there will be one current work, but due to previous titles there might be more than one Work.
|
278
347
|
#
|
279
|
-
#
|
348
|
+
# @param authorization Bearer token
|
280
349
|
# @param manifestation_id
|
281
|
-
# @param authorization
|
282
350
|
# @param [Hash] opts the optional parameters
|
283
351
|
# @return [nil]
|
284
|
-
def
|
285
|
-
|
352
|
+
def get_manifestation_works(authorization, manifestation_id, opts = {})
|
353
|
+
get_manifestation_works_with_http_info(authorization, manifestation_id, opts)
|
286
354
|
return nil
|
287
355
|
end
|
288
356
|
|
357
|
+
# Get a set of Works relating to a given Manifestation. Usually there will be one current work, but due to previous titles there might be more than one Work.
|
289
358
|
#
|
290
|
-
#
|
359
|
+
# @param authorization Bearer token
|
291
360
|
# @param manifestation_id
|
292
|
-
# @param authorization
|
293
361
|
# @param [Hash] opts the optional parameters
|
294
362
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
295
|
-
def
|
363
|
+
def get_manifestation_works_with_http_info(authorization, manifestation_id, opts = {})
|
296
364
|
if @api_client.config.debugging
|
297
|
-
@api_client.config.logger.debug "Calling API: DefaultApi.
|
365
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.get_manifestation_works ..."
|
298
366
|
end
|
299
|
-
|
300
|
-
|
367
|
+
|
368
|
+
|
301
369
|
# verify the required parameter 'authorization' is set
|
302
|
-
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.
|
370
|
+
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_manifestation_works" if authorization.nil?
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
# verify the required parameter 'manifestation_id' is set
|
378
|
+
fail ArgumentError, "Missing the required parameter 'manifestation_id' when calling DefaultApi.get_manifestation_works" if manifestation_id.nil?
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
303
384
|
# resource path
|
304
|
-
local_var_path = "/
|
385
|
+
local_var_path = "/manifestations/{manifestationId}/works".sub('{format}','json').sub('{' + 'manifestationId' + '}', manifestation_id.to_s)
|
305
386
|
|
306
387
|
# query parameters
|
307
388
|
query_params = {}
|
@@ -323,7 +404,8 @@ module MetatronClient
|
|
323
404
|
|
324
405
|
# http body (model)
|
325
406
|
post_body = nil
|
326
|
-
|
407
|
+
|
408
|
+
auth_names = ['Authorizer']
|
327
409
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
328
410
|
:header_params => header_params,
|
329
411
|
:query_params => query_params,
|
@@ -331,42 +413,51 @@ module MetatronClient
|
|
331
413
|
:body => post_body,
|
332
414
|
:auth_names => auth_names)
|
333
415
|
if @api_client.config.debugging
|
334
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
416
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_manifestation_works\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
335
417
|
end
|
336
418
|
return data, status_code, headers
|
337
419
|
end
|
338
420
|
|
421
|
+
# Get a set of Works that are similar to a specific Work
|
339
422
|
#
|
340
|
-
#
|
341
|
-
# @param
|
342
|
-
# @param authorization
|
343
|
-
# @param tenant_code
|
423
|
+
# @param authorization Bearer token
|
424
|
+
# @param work_id
|
344
425
|
# @param [Hash] opts the optional parameters
|
345
|
-
# @return [
|
346
|
-
def
|
347
|
-
data, _status_code, _headers =
|
426
|
+
# @return [WorkResultSet]
|
427
|
+
def get_work(authorization, work_id, opts = {})
|
428
|
+
data, _status_code, _headers = get_work_with_http_info(authorization, work_id, opts)
|
348
429
|
return data
|
349
430
|
end
|
350
431
|
|
432
|
+
# Get a set of Works that are similar to a specific Work
|
351
433
|
#
|
352
|
-
#
|
353
|
-
# @param
|
354
|
-
# @param authorization
|
355
|
-
# @param tenant_code
|
434
|
+
# @param authorization Bearer token
|
435
|
+
# @param work_id
|
356
436
|
# @param [Hash] opts the optional parameters
|
357
|
-
# @return [Array<(
|
358
|
-
def
|
437
|
+
# @return [Array<(WorkResultSet, Fixnum, Hash)>] WorkResultSet data, response status code and response headers
|
438
|
+
def get_work_with_http_info(authorization, work_id, opts = {})
|
359
439
|
if @api_client.config.debugging
|
360
|
-
@api_client.config.logger.debug "Calling API: DefaultApi.
|
440
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.get_work ..."
|
361
441
|
end
|
362
|
-
|
363
|
-
|
442
|
+
|
443
|
+
|
364
444
|
# verify the required parameter 'authorization' is set
|
365
|
-
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.
|
366
|
-
|
367
|
-
|
445
|
+
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_work" if authorization.nil?
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
# verify the required parameter 'work_id' is set
|
453
|
+
fail ArgumentError, "Missing the required parameter 'work_id' when calling DefaultApi.get_work" if work_id.nil?
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
|
368
459
|
# resource path
|
369
|
-
local_var_path = "/
|
460
|
+
local_var_path = "/works/{workId}/similar".sub('{format}','json').sub('{' + 'workId' + '}', work_id.to_s)
|
370
461
|
|
371
462
|
# query parameters
|
372
463
|
query_params = {}
|
@@ -388,47 +479,61 @@ module MetatronClient
|
|
388
479
|
|
389
480
|
# http body (model)
|
390
481
|
post_body = nil
|
391
|
-
|
482
|
+
|
483
|
+
auth_names = ['Authorizer']
|
392
484
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
393
485
|
:header_params => header_params,
|
394
486
|
:query_params => query_params,
|
395
487
|
:form_params => form_params,
|
396
488
|
:body => post_body,
|
397
489
|
:auth_names => auth_names,
|
398
|
-
:return_type => '
|
490
|
+
:return_type => 'WorkResultSet')
|
399
491
|
if @api_client.config.debugging
|
400
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
492
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_work\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
401
493
|
end
|
402
494
|
return data, status_code, headers
|
403
495
|
end
|
404
496
|
|
497
|
+
# Get a set of Assets that are associated with a specific Work
|
405
498
|
#
|
406
|
-
#
|
407
|
-
# @param
|
408
|
-
# @param authorization
|
499
|
+
# @param authorization Bearer token
|
500
|
+
# @param work_id
|
409
501
|
# @param [Hash] opts the optional parameters
|
410
|
-
# @return [
|
411
|
-
def
|
412
|
-
|
413
|
-
return
|
502
|
+
# @return [AssetResultSet]
|
503
|
+
def get_work_assets(authorization, work_id, opts = {})
|
504
|
+
data, _status_code, _headers = get_work_assets_with_http_info(authorization, work_id, opts)
|
505
|
+
return data
|
414
506
|
end
|
415
507
|
|
508
|
+
# Get a set of Assets that are associated with a specific Work
|
416
509
|
#
|
417
|
-
#
|
418
|
-
# @param
|
419
|
-
# @param authorization
|
510
|
+
# @param authorization Bearer token
|
511
|
+
# @param work_id
|
420
512
|
# @param [Hash] opts the optional parameters
|
421
|
-
# @return [Array<(
|
422
|
-
def
|
513
|
+
# @return [Array<(AssetResultSet, Fixnum, Hash)>] AssetResultSet data, response status code and response headers
|
514
|
+
def get_work_assets_with_http_info(authorization, work_id, opts = {})
|
423
515
|
if @api_client.config.debugging
|
424
|
-
@api_client.config.logger.debug "Calling API: DefaultApi.
|
516
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.get_work_assets ..."
|
425
517
|
end
|
426
|
-
|
427
|
-
|
518
|
+
|
519
|
+
|
428
520
|
# verify the required parameter 'authorization' is set
|
429
|
-
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.
|
521
|
+
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_work_assets" if authorization.nil?
|
522
|
+
|
523
|
+
|
524
|
+
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
# verify the required parameter 'work_id' is set
|
529
|
+
fail ArgumentError, "Missing the required parameter 'work_id' when calling DefaultApi.get_work_assets" if work_id.nil?
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
|
534
|
+
|
430
535
|
# resource path
|
431
|
-
local_var_path = "/
|
536
|
+
local_var_path = "/works/{workId}/assets".sub('{format}','json').sub('{' + 'workId' + '}', work_id.to_s)
|
432
537
|
|
433
538
|
# query parameters
|
434
539
|
query_params = {}
|
@@ -450,69 +555,70 @@ module MetatronClient
|
|
450
555
|
|
451
556
|
# http body (model)
|
452
557
|
post_body = nil
|
453
|
-
|
558
|
+
|
559
|
+
auth_names = ['Authorizer']
|
454
560
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
455
561
|
:header_params => header_params,
|
456
562
|
:query_params => query_params,
|
457
563
|
:form_params => form_params,
|
458
564
|
:body => post_body,
|
459
|
-
:auth_names => auth_names
|
565
|
+
:auth_names => auth_names,
|
566
|
+
:return_type => 'AssetResultSet')
|
460
567
|
if @api_client.config.debugging
|
461
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
568
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_work_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
462
569
|
end
|
463
570
|
return data, status_code, headers
|
464
571
|
end
|
465
572
|
|
573
|
+
# Get a set of Manifestations that encompass a specific Work
|
466
574
|
#
|
467
|
-
#
|
468
|
-
# @param
|
469
|
-
# @param offset
|
470
|
-
# @param q
|
471
|
-
# @param authorization
|
575
|
+
# @param authorization Bearer token
|
576
|
+
# @param work_id
|
472
577
|
# @param [Hash] opts the optional parameters
|
473
|
-
# @
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
return data
|
578
|
+
# @return [nil]
|
579
|
+
def get_work_manifestations(authorization, work_id, opts = {})
|
580
|
+
get_work_manifestations_with_http_info(authorization, work_id, opts)
|
581
|
+
return nil
|
478
582
|
end
|
479
583
|
|
584
|
+
# Get a set of Manifestations that encompass a specific Work
|
480
585
|
#
|
481
|
-
#
|
482
|
-
# @param
|
483
|
-
# @param offset
|
484
|
-
# @param q
|
485
|
-
# @param authorization
|
586
|
+
# @param authorization Bearer token
|
587
|
+
# @param work_id
|
486
588
|
# @param [Hash] opts the optional parameters
|
487
|
-
# @
|
488
|
-
|
489
|
-
def works_get_with_http_info(limit, offset, q, authorization, opts = {})
|
589
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
590
|
+
def get_work_manifestations_with_http_info(authorization, work_id, opts = {})
|
490
591
|
if @api_client.config.debugging
|
491
|
-
@api_client.config.logger.debug "Calling API: DefaultApi.
|
592
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.get_work_manifestations ..."
|
492
593
|
end
|
493
|
-
|
494
|
-
|
495
|
-
# verify the required parameter 'offset' is set
|
496
|
-
fail ArgumentError, "Missing the required parameter 'offset' when calling DefaultApi.works_get" if offset.nil?
|
497
|
-
# verify the required parameter 'q' is set
|
498
|
-
fail ArgumentError, "Missing the required parameter 'q' when calling DefaultApi.works_get" if q.nil?
|
594
|
+
|
595
|
+
|
499
596
|
# verify the required parameter 'authorization' is set
|
500
|
-
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.
|
597
|
+
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.get_work_manifestations" if authorization.nil?
|
598
|
+
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
# verify the required parameter 'work_id' is set
|
605
|
+
fail ArgumentError, "Missing the required parameter 'work_id' when calling DefaultApi.get_work_manifestations" if work_id.nil?
|
606
|
+
|
607
|
+
|
608
|
+
|
609
|
+
|
610
|
+
|
501
611
|
# resource path
|
502
|
-
local_var_path = "/
|
612
|
+
local_var_path = "/works/{workId}/manifestations".sub('{format}','json').sub('{' + 'workId' + '}', work_id.to_s)
|
503
613
|
|
504
614
|
# query parameters
|
505
615
|
query_params = {}
|
506
|
-
query_params[:'limit'] = limit
|
507
|
-
query_params[:'offset'] = offset
|
508
|
-
query_params[:'q'] = q
|
509
|
-
query_params[:'include'] = opts[:'include'] if opts[:'include']
|
510
616
|
|
511
617
|
# header parameters
|
512
618
|
header_params = {}
|
513
619
|
|
514
620
|
# HTTP header 'Accept' (if needed)
|
515
|
-
local_header_accept = ['application/vnd.api+json'
|
621
|
+
local_header_accept = ['application/vnd.api+json']
|
516
622
|
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
517
623
|
|
518
624
|
# HTTP header 'Content-Type'
|
@@ -525,56 +631,77 @@ module MetatronClient
|
|
525
631
|
|
526
632
|
# http body (model)
|
527
633
|
post_body = nil
|
528
|
-
|
634
|
+
|
635
|
+
auth_names = ['Authorizer']
|
529
636
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
530
637
|
:header_params => header_params,
|
531
638
|
:query_params => query_params,
|
532
639
|
:form_params => form_params,
|
533
640
|
:body => post_body,
|
534
|
-
:auth_names => auth_names
|
535
|
-
:return_type => 'WorkResultSet')
|
641
|
+
:auth_names => auth_names)
|
536
642
|
if @api_client.config.debugging
|
537
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
643
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_work_manifestations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
538
644
|
end
|
539
645
|
return data, status_code, headers
|
540
646
|
end
|
541
647
|
|
542
648
|
#
|
543
|
-
#
|
544
|
-
# @param
|
545
|
-
# @param authorization
|
649
|
+
# Get the manifestation set best matching the given bibliographic data
|
650
|
+
# @param authorization Bearer token
|
546
651
|
# @param [Hash] opts the optional parameters
|
547
|
-
# @
|
548
|
-
|
549
|
-
|
652
|
+
# @option opts [String] :isbn The isbn
|
653
|
+
# @option opts [String] :work_id The ID of a work
|
654
|
+
# @return [ManifestationResultSet]
|
655
|
+
def manifestation(authorization, opts = {})
|
656
|
+
data, _status_code, _headers = manifestation_with_http_info(authorization, opts)
|
550
657
|
return data
|
551
658
|
end
|
552
659
|
|
553
660
|
#
|
554
|
-
#
|
555
|
-
# @param
|
556
|
-
# @param authorization
|
661
|
+
# Get the manifestation set best matching the given bibliographic data
|
662
|
+
# @param authorization Bearer token
|
557
663
|
# @param [Hash] opts the optional parameters
|
558
|
-
# @
|
559
|
-
|
664
|
+
# @option opts [String] :isbn The isbn
|
665
|
+
# @option opts [String] :work_id The ID of a work
|
666
|
+
# @return [Array<(ManifestationResultSet, Fixnum, Hash)>] ManifestationResultSet data, response status code and response headers
|
667
|
+
def manifestation_with_http_info(authorization, opts = {})
|
560
668
|
if @api_client.config.debugging
|
561
|
-
@api_client.config.logger.debug "Calling API: DefaultApi.
|
669
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.manifestation ..."
|
562
670
|
end
|
563
|
-
|
564
|
-
|
671
|
+
|
672
|
+
|
565
673
|
# verify the required parameter 'authorization' is set
|
566
|
-
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.
|
674
|
+
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.manifestation" if authorization.nil?
|
675
|
+
|
676
|
+
|
677
|
+
|
678
|
+
|
679
|
+
|
680
|
+
|
681
|
+
|
682
|
+
|
683
|
+
|
684
|
+
|
685
|
+
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
|
690
|
+
|
691
|
+
|
567
692
|
# resource path
|
568
|
-
local_var_path = "/
|
693
|
+
local_var_path = "/manifestations".sub('{format}','json')
|
569
694
|
|
570
695
|
# query parameters
|
571
696
|
query_params = {}
|
697
|
+
query_params[:'isbn'] = opts[:'isbn'] if opts[:'isbn']
|
698
|
+
query_params[:'work_id'] = opts[:'work_id'] if opts[:'work_id']
|
572
699
|
|
573
700
|
# header parameters
|
574
701
|
header_params = {}
|
575
702
|
|
576
703
|
# HTTP header 'Accept' (if needed)
|
577
|
-
local_header_accept = ['application/vnd.api+json'
|
704
|
+
local_header_accept = ['application/vnd.api+json']
|
578
705
|
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
579
706
|
|
580
707
|
# HTTP header 'Content-Type'
|
@@ -587,47 +714,71 @@ module MetatronClient
|
|
587
714
|
|
588
715
|
# http body (model)
|
589
716
|
post_body = nil
|
590
|
-
|
717
|
+
|
718
|
+
auth_names = ['Authorizer']
|
591
719
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
592
720
|
:header_params => header_params,
|
593
721
|
:query_params => query_params,
|
594
722
|
:form_params => form_params,
|
595
723
|
:body => post_body,
|
596
724
|
:auth_names => auth_names,
|
597
|
-
:return_type => '
|
725
|
+
:return_type => 'ManifestationResultSet')
|
598
726
|
if @api_client.config.debugging
|
599
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
727
|
+
@api_client.config.logger.debug "API called: DefaultApi#manifestation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
600
728
|
end
|
601
729
|
return data, status_code, headers
|
602
730
|
end
|
603
731
|
|
604
732
|
#
|
605
|
-
#
|
606
|
-
# @param
|
607
|
-
# @param
|
733
|
+
# Remove an asset
|
734
|
+
# @param authorization Bearer token
|
735
|
+
# @param asset_id
|
736
|
+
# @param asset_type
|
608
737
|
# @param [Hash] opts the optional parameters
|
609
738
|
# @return [nil]
|
610
|
-
def
|
611
|
-
|
739
|
+
def remove_asset(authorization, asset_id, asset_type, opts = {})
|
740
|
+
remove_asset_with_http_info(authorization, asset_id, asset_type, opts)
|
612
741
|
return nil
|
613
742
|
end
|
614
743
|
|
615
744
|
#
|
616
|
-
#
|
617
|
-
# @param
|
618
|
-
# @param
|
745
|
+
# Remove an asset
|
746
|
+
# @param authorization Bearer token
|
747
|
+
# @param asset_id
|
748
|
+
# @param asset_type
|
619
749
|
# @param [Hash] opts the optional parameters
|
620
750
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
621
|
-
def
|
751
|
+
def remove_asset_with_http_info(authorization, asset_id, asset_type, opts = {})
|
622
752
|
if @api_client.config.debugging
|
623
|
-
@api_client.config.logger.debug "Calling API: DefaultApi.
|
753
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.remove_asset ..."
|
624
754
|
end
|
625
|
-
|
626
|
-
|
755
|
+
|
756
|
+
|
627
757
|
# verify the required parameter 'authorization' is set
|
628
|
-
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.
|
758
|
+
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.remove_asset" if authorization.nil?
|
759
|
+
|
760
|
+
|
761
|
+
|
762
|
+
|
763
|
+
|
764
|
+
|
765
|
+
# verify the required parameter 'asset_id' is set
|
766
|
+
fail ArgumentError, "Missing the required parameter 'asset_id' when calling DefaultApi.remove_asset" if asset_id.nil?
|
767
|
+
|
768
|
+
|
769
|
+
|
770
|
+
|
771
|
+
|
772
|
+
|
773
|
+
# verify the required parameter 'asset_type' is set
|
774
|
+
fail ArgumentError, "Missing the required parameter 'asset_type' when calling DefaultApi.remove_asset" if asset_type.nil?
|
775
|
+
|
776
|
+
|
777
|
+
|
778
|
+
|
779
|
+
|
629
780
|
# resource path
|
630
|
-
local_var_path = "/
|
781
|
+
local_var_path = "/assets/{assetType}/{assetId}".sub('{format}','json').sub('{' + 'assetId' + '}', asset_id.to_s).sub('{' + 'assetType' + '}', asset_type.to_s)
|
631
782
|
|
632
783
|
# query parameters
|
633
784
|
query_params = {}
|
@@ -649,49 +800,95 @@ module MetatronClient
|
|
649
800
|
|
650
801
|
# http body (model)
|
651
802
|
post_body = nil
|
652
|
-
|
653
|
-
|
803
|
+
|
804
|
+
auth_names = ['Authorizer']
|
805
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
654
806
|
:header_params => header_params,
|
655
807
|
:query_params => query_params,
|
656
808
|
:form_params => form_params,
|
657
809
|
:body => post_body,
|
658
810
|
:auth_names => auth_names)
|
659
811
|
if @api_client.config.debugging
|
660
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
812
|
+
@api_client.config.logger.debug "API called: DefaultApi#remove_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
661
813
|
end
|
662
814
|
return data, status_code, headers
|
663
815
|
end
|
664
816
|
|
817
|
+
# Get the work best matching the given bibliographic data
|
665
818
|
#
|
666
|
-
#
|
667
|
-
# @param
|
668
|
-
# @param
|
819
|
+
# @param authorization Bearer token
|
820
|
+
# @param q Search works for the supplied term
|
821
|
+
# @param limit Limit the results to n results
|
822
|
+
# @param offset Offset the results to position n
|
669
823
|
# @param [Hash] opts the optional parameters
|
824
|
+
# @option opts [Array<String>] :include Define which relationships to include, comma separated
|
670
825
|
# @return [WorkResultSet]
|
671
|
-
def
|
672
|
-
data, _status_code, _headers =
|
826
|
+
def work(authorization, q, limit, offset, opts = {})
|
827
|
+
data, _status_code, _headers = work_with_http_info(authorization, q, limit, offset, opts)
|
673
828
|
return data
|
674
829
|
end
|
675
830
|
|
831
|
+
# Get the work best matching the given bibliographic data
|
676
832
|
#
|
677
|
-
#
|
678
|
-
# @param
|
679
|
-
# @param
|
833
|
+
# @param authorization Bearer token
|
834
|
+
# @param q Search works for the supplied term
|
835
|
+
# @param limit Limit the results to n results
|
836
|
+
# @param offset Offset the results to position n
|
680
837
|
# @param [Hash] opts the optional parameters
|
838
|
+
# @option opts [Array<String>] :include Define which relationships to include, comma separated
|
681
839
|
# @return [Array<(WorkResultSet, Fixnum, Hash)>] WorkResultSet data, response status code and response headers
|
682
|
-
def
|
840
|
+
def work_with_http_info(authorization, q, limit, offset, opts = {})
|
683
841
|
if @api_client.config.debugging
|
684
|
-
@api_client.config.logger.debug "Calling API: DefaultApi.
|
842
|
+
@api_client.config.logger.debug "Calling API: DefaultApi.work ..."
|
685
843
|
end
|
686
|
-
|
687
|
-
|
844
|
+
|
845
|
+
|
688
846
|
# verify the required parameter 'authorization' is set
|
689
|
-
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.
|
847
|
+
fail ArgumentError, "Missing the required parameter 'authorization' when calling DefaultApi.work" if authorization.nil?
|
848
|
+
|
849
|
+
|
850
|
+
|
851
|
+
|
852
|
+
|
853
|
+
|
854
|
+
# verify the required parameter 'q' is set
|
855
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling DefaultApi.work" if q.nil?
|
856
|
+
|
857
|
+
|
858
|
+
|
859
|
+
|
860
|
+
|
861
|
+
|
862
|
+
# verify the required parameter 'limit' is set
|
863
|
+
fail ArgumentError, "Missing the required parameter 'limit' when calling DefaultApi.work" if limit.nil?
|
864
|
+
|
865
|
+
|
866
|
+
|
867
|
+
|
868
|
+
|
869
|
+
|
870
|
+
# verify the required parameter 'offset' is set
|
871
|
+
fail ArgumentError, "Missing the required parameter 'offset' when calling DefaultApi.work" if offset.nil?
|
872
|
+
|
873
|
+
|
874
|
+
|
875
|
+
|
876
|
+
|
877
|
+
|
878
|
+
|
879
|
+
|
880
|
+
|
881
|
+
|
882
|
+
|
690
883
|
# resource path
|
691
|
-
local_var_path = "/
|
884
|
+
local_var_path = "/works".sub('{format}','json')
|
692
885
|
|
693
886
|
# query parameters
|
694
887
|
query_params = {}
|
888
|
+
query_params[:'q'] = q
|
889
|
+
query_params[:'limit'] = limit
|
890
|
+
query_params[:'offset'] = offset
|
891
|
+
query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if opts[:'include']
|
695
892
|
|
696
893
|
# header parameters
|
697
894
|
header_params = {}
|
@@ -710,7 +907,8 @@ module MetatronClient
|
|
710
907
|
|
711
908
|
# http body (model)
|
712
909
|
post_body = nil
|
713
|
-
|
910
|
+
|
911
|
+
auth_names = ['Authorizer']
|
714
912
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
715
913
|
:header_params => header_params,
|
716
914
|
:query_params => query_params,
|
@@ -719,7 +917,7 @@ module MetatronClient
|
|
719
917
|
:auth_names => auth_names,
|
720
918
|
:return_type => 'WorkResultSet')
|
721
919
|
if @api_client.config.debugging
|
722
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
920
|
+
@api_client.config.logger.debug "API called: DefaultApi#work\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
723
921
|
end
|
724
922
|
return data, status_code, headers
|
725
923
|
end
|