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.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +168 -0
- data/Rakefile +8 -0
- data/ddr_client.gemspec +46 -0
- data/docs/BatchObjectsApi.md +125 -0
- data/docs/BatchesApi.md +305 -0
- data/docs/DdrAPIBatchEntity.md +24 -0
- data/docs/DdrAPIBatchEntityLogfile.md +11 -0
- data/docs/DdrAPIBatchObjectAttributeEntity.md +16 -0
- data/docs/DdrAPIBatchObjectDatastreamEntity.md +17 -0
- data/docs/DdrAPIBatchObjectEntity.md +26 -0
- data/docs/DdrAPIBatchObjectMessageEntity.md +13 -0
- data/docs/DdrAPIBatchObjectRelationshipEntity.md +15 -0
- data/docs/DdrAPIBatchObjectRoleEntity.md +15 -0
- data/docs/DdrAPIEventEntity.md +17 -0
- data/docs/DdrAPIFileEntity.md +11 -0
- data/docs/DdrAPIGroupEntity.md +10 -0
- data/docs/DdrAPIGroupMemberEntity.md +10 -0
- data/docs/DdrAPILinkEntity.md +9 -0
- data/docs/DdrAPIResourceEntity.md +17 -0
- data/docs/DdrAPIResourceEntityFiles.md +17 -0
- data/docs/DdrAPIResourceEntityMetadata.md +62 -0
- data/docs/DdrAPIResourceEntityRelated.md +11 -0
- data/docs/DdrAPIRoleEntity.md +10 -0
- data/docs/DdrAPITechnicalMetadataEntity.md +24 -0
- data/docs/DdrAPIUserEntity.md +19 -0
- data/docs/EventsApi.md +131 -0
- data/docs/GroupsApi.md +63 -0
- data/docs/IndexApi.md +161 -0
- data/docs/PatchResources.md +11 -0
- data/docs/PatchResourcesMetadata.md +62 -0
- data/docs/PatchResourcesRelated.md +11 -0
- data/docs/PatchResourcesRoles.md +10 -0
- data/docs/PostResources.md +12 -0
- data/docs/QueuesApi.md +102 -0
- data/docs/ReportsApi.md +177 -0
- data/docs/ResourcesApi.md +1003 -0
- data/docs/SchemaApi.md +128 -0
- data/docs/UsersApi.md +131 -0
- data/git_push.sh +55 -0
- data/lib/ddr_client/api/batch_objects_api.rb +138 -0
- data/lib/ddr_client/api/batches_api.rb +306 -0
- data/lib/ddr_client/api/events_api.rb +147 -0
- data/lib/ddr_client/api/groups_api.rb +70 -0
- data/lib/ddr_client/api/index_api.rb +164 -0
- data/lib/ddr_client/api/queues_api.rb +109 -0
- data/lib/ddr_client/api/reports_api.rb +179 -0
- data/lib/ddr_client/api/resources_api.rb +1098 -0
- data/lib/ddr_client/api/schema_api.rb +152 -0
- data/lib/ddr_client/api/users_api.rb +141 -0
- data/lib/ddr_client/api_client.rb +391 -0
- data/lib/ddr_client/api_error.rb +38 -0
- data/lib/ddr_client/configuration.rb +209 -0
- data/lib/ddr_client/models/ddr_api_batch_entity.rb +333 -0
- data/lib/ddr_client/models/ddr_api_batch_entity_logfile.rb +211 -0
- data/lib/ddr_client/models/ddr_api_batch_object_attribute_entity.rb +256 -0
- data/lib/ddr_client/models/ddr_api_batch_object_datastream_entity.rb +265 -0
- data/lib/ddr_client/models/ddr_api_batch_object_entity.rb +349 -0
- data/lib/ddr_client/models/ddr_api_batch_object_message_entity.rb +230 -0
- data/lib/ddr_client/models/ddr_api_batch_object_relationship_entity.rb +247 -0
- data/lib/ddr_client/models/ddr_api_batch_object_role_entity.rb +247 -0
- data/lib/ddr_client/models/ddr_api_event_entity.rb +325 -0
- data/lib/ddr_client/models/ddr_api_file_entity.rb +215 -0
- data/lib/ddr_client/models/ddr_api_group_entity.rb +203 -0
- data/lib/ddr_client/models/ddr_api_group_member_entity.rb +202 -0
- data/lib/ddr_client/models/ddr_api_link_entity.rb +193 -0
- data/lib/ddr_client/models/ddr_api_resource_entity.rb +310 -0
- data/lib/ddr_client/models/ddr_api_resource_entity_files.rb +276 -0
- data/lib/ddr_client/models/ddr_api_resource_entity_metadata.rb +874 -0
- data/lib/ddr_client/models/ddr_api_resource_entity_related.rb +216 -0
- data/lib/ddr_client/models/ddr_api_role_entity.rb +251 -0
- data/lib/ddr_client/models/ddr_api_technical_metadata_entity.rb +329 -0
- data/lib/ddr_client/models/ddr_api_user_entity.rb +296 -0
- data/lib/ddr_client/models/patch_resources.rb +221 -0
- data/lib/ddr_client/models/patch_resources_metadata.rb +726 -0
- data/lib/ddr_client/models/patch_resources_related.rb +216 -0
- data/lib/ddr_client/models/patch_resources_roles.rb +220 -0
- data/lib/ddr_client/models/post_resources.rb +265 -0
- data/lib/ddr_client/version.rb +15 -0
- data/lib/ddr_client.rb +74 -0
- data/spec/api/batch_objects_api_spec.rb +61 -0
- data/spec/api/batches_api_spec.rb +100 -0
- data/spec/api/events_api_spec.rb +64 -0
- data/spec/api/groups_api_spec.rb +46 -0
- data/spec/api/index_api_spec.rb +67 -0
- data/spec/api/queues_api_spec.rb +55 -0
- data/spec/api/reports_api_spec.rb +70 -0
- data/spec/api/resources_api_spec.rb +271 -0
- data/spec/api/schema_api_spec.rb +65 -0
- data/spec/api/users_api_spec.rb +64 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/ddr_api_batch_entity_logfile_spec.rb +59 -0
- data/spec/models/ddr_api_batch_entity_spec.rb +137 -0
- data/spec/models/ddr_api_batch_object_attribute_entity_spec.rb +89 -0
- data/spec/models/ddr_api_batch_object_datastream_entity_spec.rb +95 -0
- data/spec/models/ddr_api_batch_object_entity_spec.rb +149 -0
- data/spec/models/ddr_api_batch_object_message_entity_spec.rb +71 -0
- data/spec/models/ddr_api_batch_object_relationship_entity_spec.rb +83 -0
- data/spec/models/ddr_api_batch_object_role_entity_spec.rb +83 -0
- data/spec/models/ddr_api_event_entity_spec.rb +103 -0
- data/spec/models/ddr_api_file_entity_spec.rb +59 -0
- data/spec/models/ddr_api_group_entity_spec.rb +53 -0
- data/spec/models/ddr_api_group_member_entity_spec.rb +53 -0
- data/spec/models/ddr_api_link_entity_spec.rb +47 -0
- data/spec/models/ddr_api_resource_entity_files_spec.rb +95 -0
- data/spec/models/ddr_api_resource_entity_metadata_spec.rb +389 -0
- data/spec/models/ddr_api_resource_entity_related_spec.rb +59 -0
- data/spec/models/ddr_api_resource_entity_spec.rb +99 -0
- data/spec/models/ddr_api_role_entity_spec.rb +61 -0
- data/spec/models/ddr_api_technical_metadata_entity_spec.rb +137 -0
- data/spec/models/ddr_api_user_entity_spec.rb +107 -0
- data/spec/models/patch_resources_metadata_spec.rb +365 -0
- data/spec/models/patch_resources_related_spec.rb +59 -0
- data/spec/models/patch_resources_roles_spec.rb +53 -0
- data/spec/models/patch_resources_spec.rb +59 -0
- data/spec/models/post_resources_spec.rb +69 -0
- data/spec/spec_helper.rb +111 -0
- metadata +399 -0
@@ -0,0 +1,109 @@
|
|
1
|
+
=begin
|
2
|
+
#Duke Digital Repository API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.36
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module DdrClient
|
16
|
+
class QueuesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Unlock locked jobs
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @return [nil]
|
25
|
+
def delete_queues_locks(opts = {})
|
26
|
+
delete_queues_locks_with_http_info(opts)
|
27
|
+
nil
|
28
|
+
end
|
29
|
+
|
30
|
+
# Unlock locked jobs
|
31
|
+
# @param [Hash] opts the optional parameters
|
32
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
33
|
+
def delete_queues_locks_with_http_info(opts = {})
|
34
|
+
if @api_client.config.debugging
|
35
|
+
@api_client.config.logger.debug 'Calling API: QueuesApi.delete_queues_locks ...'
|
36
|
+
end
|
37
|
+
# resource path
|
38
|
+
local_var_path = '/queues/locks'
|
39
|
+
|
40
|
+
# query parameters
|
41
|
+
query_params = {}
|
42
|
+
|
43
|
+
# header parameters
|
44
|
+
header_params = {}
|
45
|
+
# HTTP header 'Accept' (if needed)
|
46
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
47
|
+
|
48
|
+
# form parameters
|
49
|
+
form_params = {}
|
50
|
+
|
51
|
+
# http body (model)
|
52
|
+
post_body = nil
|
53
|
+
auth_names = ['oauth']
|
54
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
55
|
+
:header_params => header_params,
|
56
|
+
:query_params => query_params,
|
57
|
+
:form_params => form_params,
|
58
|
+
:body => post_body,
|
59
|
+
:auth_names => auth_names)
|
60
|
+
if @api_client.config.debugging
|
61
|
+
@api_client.config.logger.debug "API called: QueuesApi#delete_queues_locks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
62
|
+
end
|
63
|
+
return data, status_code, headers
|
64
|
+
end
|
65
|
+
# Retrieve summary infomation on background job queues
|
66
|
+
# @param [Hash] opts the optional parameters
|
67
|
+
# @return [nil]
|
68
|
+
def get_queues_stats(opts = {})
|
69
|
+
get_queues_stats_with_http_info(opts)
|
70
|
+
nil
|
71
|
+
end
|
72
|
+
|
73
|
+
# Retrieve summary infomation on background job queues
|
74
|
+
# @param [Hash] opts the optional parameters
|
75
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
76
|
+
def get_queues_stats_with_http_info(opts = {})
|
77
|
+
if @api_client.config.debugging
|
78
|
+
@api_client.config.logger.debug 'Calling API: QueuesApi.get_queues_stats ...'
|
79
|
+
end
|
80
|
+
# resource path
|
81
|
+
local_var_path = '/queues/stats'
|
82
|
+
|
83
|
+
# query parameters
|
84
|
+
query_params = {}
|
85
|
+
|
86
|
+
# header parameters
|
87
|
+
header_params = {}
|
88
|
+
# HTTP header 'Accept' (if needed)
|
89
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
90
|
+
|
91
|
+
# form parameters
|
92
|
+
form_params = {}
|
93
|
+
|
94
|
+
# http body (model)
|
95
|
+
post_body = nil
|
96
|
+
auth_names = ['oauth']
|
97
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
98
|
+
:header_params => header_params,
|
99
|
+
:query_params => query_params,
|
100
|
+
:form_params => form_params,
|
101
|
+
:body => post_body,
|
102
|
+
:auth_names => auth_names)
|
103
|
+
if @api_client.config.debugging
|
104
|
+
@api_client.config.logger.debug "API called: QueuesApi#get_queues_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
105
|
+
end
|
106
|
+
return data, status_code, headers
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
@@ -0,0 +1,179 @@
|
|
1
|
+
=begin
|
2
|
+
#Duke Digital Repository API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: v1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.36
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module DdrClient
|
16
|
+
class ReportsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Collection summary report
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @option opts [Array<String>] :fields Fields to include for each collection (default: id, title, ingestion_date, admin_set, workflow_state)
|
25
|
+
# @return [File]
|
26
|
+
def get_reports_collection_summary(opts = {})
|
27
|
+
data, _status_code, _headers = get_reports_collection_summary_with_http_info(opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Collection summary report
|
32
|
+
# @param [Hash] opts the optional parameters
|
33
|
+
# @option opts [Array<String>] :fields Fields to include for each collection (default: id, title, ingestion_date, admin_set, workflow_state)
|
34
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
35
|
+
def get_reports_collection_summary_with_http_info(opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: ReportsApi.get_reports_collection_summary ...'
|
38
|
+
end
|
39
|
+
if @api_client.config.client_side_validation && opts[:'fields'] && !opts[:'fields'].all? { |item| ['abstract', 'accessRights', 'admin_set', 'aleph_id', 'alternative', 'aspace_id', 'available', 'biblical_book', 'caption', 'category', 'chapter_and_verse', 'company', 'content', 'contentdm_id', 'contributor', 'created_at', 'creator', 'date', 'derived_image', 'description', 'display_format', 'doi', 'ead_id', 'extent', 'extracted_text', 'fcrepo3_pid', 'fits_file', 'format', 'hasPart', 'headline', 'id', 'identifier', 'ingested_by', 'ingestion_date', 'intermediate_file', 'isFormatOf', 'isPartOf', 'issue_number', 'language', 'local_id', 'medium', 'model', 'multires_image', 'nested_path', 'optimistic_lock_token', 'permanent_id', 'permanent_url', 'placement_company', 'product', 'provenance', 'publication', 'publisher', 'relation', 'research_help_contact', 'rights', 'rights_note', 'roles', 'series', 'setting', 'spatial', 'sponsor', 'streamable_media', 'struct_metadata', 'subject', 'thumbnail', 'title', 'tone', 'type', 'updated_at', 'volume', 'workflow_state'].include?(item) }
|
40
|
+
fail ArgumentError, 'invalid value for "fields", must include one of abstract, accessRights, admin_set, aleph_id, alternative, aspace_id, available, biblical_book, caption, category, chapter_and_verse, company, content, contentdm_id, contributor, created_at, creator, date, derived_image, description, display_format, doi, ead_id, extent, extracted_text, fcrepo3_pid, fits_file, format, hasPart, headline, id, identifier, ingested_by, ingestion_date, intermediate_file, isFormatOf, isPartOf, issue_number, language, local_id, medium, model, multires_image, nested_path, optimistic_lock_token, permanent_id, permanent_url, placement_company, product, provenance, publication, publisher, relation, research_help_contact, rights, rights_note, roles, series, setting, spatial, sponsor, streamable_media, struct_metadata, subject, thumbnail, title, tone, type, updated_at, volume, workflow_state'
|
41
|
+
end
|
42
|
+
# resource path
|
43
|
+
local_var_path = '/reports/collection_summary'
|
44
|
+
|
45
|
+
# query parameters
|
46
|
+
query_params = {}
|
47
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/csv'])
|
53
|
+
|
54
|
+
# form parameters
|
55
|
+
form_params = {}
|
56
|
+
|
57
|
+
# http body (model)
|
58
|
+
post_body = nil
|
59
|
+
auth_names = ['oauth']
|
60
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
61
|
+
:header_params => header_params,
|
62
|
+
:query_params => query_params,
|
63
|
+
:form_params => form_params,
|
64
|
+
:body => post_body,
|
65
|
+
:auth_names => auth_names,
|
66
|
+
:return_type => 'File')
|
67
|
+
if @api_client.config.debugging
|
68
|
+
@api_client.config.logger.debug "API called: ReportsApi#get_reports_collection_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
69
|
+
end
|
70
|
+
return data, status_code, headers
|
71
|
+
end
|
72
|
+
# Duplicate content report
|
73
|
+
# @param [Hash] opts the optional parameters
|
74
|
+
# @option opts [Array<String>] :fields Fields to include in the report (default: sha1, id, model, original_filename, parent_id, collection_title, workflow_state, ingestion_date)
|
75
|
+
# @return [File]
|
76
|
+
def get_reports_duplicate_content(opts = {})
|
77
|
+
data, _status_code, _headers = get_reports_duplicate_content_with_http_info(opts)
|
78
|
+
data
|
79
|
+
end
|
80
|
+
|
81
|
+
# Duplicate content report
|
82
|
+
# @param [Hash] opts the optional parameters
|
83
|
+
# @option opts [Array<String>] :fields Fields to include in the report (default: sha1, id, model, original_filename, parent_id, collection_title, workflow_state, ingestion_date)
|
84
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
85
|
+
def get_reports_duplicate_content_with_http_info(opts = {})
|
86
|
+
if @api_client.config.debugging
|
87
|
+
@api_client.config.logger.debug 'Calling API: ReportsApi.get_reports_duplicate_content ...'
|
88
|
+
end
|
89
|
+
if @api_client.config.client_side_validation && opts[:'fields'] && !opts[:'fields'].all? { |item| ['abstract', 'accessRights', 'admin_set', 'aleph_id', 'alternative', 'aspace_id', 'available', 'biblical_book', 'caption', 'category', 'chapter_and_verse', 'collection_id', 'collection_title', 'company', 'content', 'contentdm_id', 'contributor', 'created_at', 'creator', 'date', 'derived_image', 'description', 'display_format', 'doi', 'ead_id', 'extent', 'extracted_text', 'fcrepo3_pid', 'fits_file', 'format', 'hasPart', 'headline', 'id', 'identifier', 'ingested_by', 'ingestion_date', 'intermediate_file', 'isFormatOf', 'isPartOf', 'issue_number', 'language', 'local_id', 'medium', 'model', 'multires_image', 'nested_path', 'optimistic_lock_token', 'original_filename', 'parent_id', 'parent_title', 'permanent_id', 'permanent_url', 'placement_company', 'product', 'provenance', 'publication', 'publisher', 'relation', 'research_help_contact', 'rights', 'rights_note', 'roles', 'series', 'setting', 'sha1', 'spatial', 'sponsor', 'streamable_media', 'struct_metadata', 'subject', 'thumbnail', 'title', 'tone', 'type', 'updated_at', 'volume', 'workflow_state'].include?(item) }
|
90
|
+
fail ArgumentError, 'invalid value for "fields", must include one of abstract, accessRights, admin_set, aleph_id, alternative, aspace_id, available, biblical_book, caption, category, chapter_and_verse, collection_id, collection_title, company, content, contentdm_id, contributor, created_at, creator, date, derived_image, description, display_format, doi, ead_id, extent, extracted_text, fcrepo3_pid, fits_file, format, hasPart, headline, id, identifier, ingested_by, ingestion_date, intermediate_file, isFormatOf, isPartOf, issue_number, language, local_id, medium, model, multires_image, nested_path, optimistic_lock_token, original_filename, parent_id, parent_title, permanent_id, permanent_url, placement_company, product, provenance, publication, publisher, relation, research_help_contact, rights, rights_note, roles, series, setting, sha1, spatial, sponsor, streamable_media, struct_metadata, subject, thumbnail, title, tone, type, updated_at, volume, workflow_state'
|
91
|
+
end
|
92
|
+
# resource path
|
93
|
+
local_var_path = '/reports/duplicate_content'
|
94
|
+
|
95
|
+
# query parameters
|
96
|
+
query_params = {}
|
97
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
98
|
+
|
99
|
+
# header parameters
|
100
|
+
header_params = {}
|
101
|
+
# HTTP header 'Accept' (if needed)
|
102
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/csv'])
|
103
|
+
|
104
|
+
# form parameters
|
105
|
+
form_params = {}
|
106
|
+
|
107
|
+
# http body (model)
|
108
|
+
post_body = nil
|
109
|
+
auth_names = ['oauth']
|
110
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
111
|
+
:header_params => header_params,
|
112
|
+
:query_params => query_params,
|
113
|
+
:form_params => form_params,
|
114
|
+
:body => post_body,
|
115
|
+
:auth_names => auth_names,
|
116
|
+
:return_type => 'File')
|
117
|
+
if @api_client.config.debugging
|
118
|
+
@api_client.config.logger.debug "API called: ReportsApi#get_reports_duplicate_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
119
|
+
end
|
120
|
+
return data, status_code, headers
|
121
|
+
end
|
122
|
+
# Roles report
|
123
|
+
# @param [Hash] opts the optional parameters
|
124
|
+
# @option opts [BOOLEAN] :include_inherited Include inherited roles for Item resources (default to false)
|
125
|
+
# @option opts [String] :collection_id Limit resources to members of Collection ID
|
126
|
+
# @option opts [Array<String>] :fields Fields to include in the report (default: id, model, title)
|
127
|
+
# @return [File]
|
128
|
+
def get_reports_roles(opts = {})
|
129
|
+
data, _status_code, _headers = get_reports_roles_with_http_info(opts)
|
130
|
+
data
|
131
|
+
end
|
132
|
+
|
133
|
+
# Roles report
|
134
|
+
# @param [Hash] opts the optional parameters
|
135
|
+
# @option opts [BOOLEAN] :include_inherited Include inherited roles for Item resources
|
136
|
+
# @option opts [String] :collection_id Limit resources to members of Collection ID
|
137
|
+
# @option opts [Array<String>] :fields Fields to include in the report (default: id, model, title)
|
138
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
139
|
+
def get_reports_roles_with_http_info(opts = {})
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug 'Calling API: ReportsApi.get_reports_roles ...'
|
142
|
+
end
|
143
|
+
if @api_client.config.client_side_validation && opts[:'fields'] && !opts[:'fields'].all? { |item| ['abstract', 'accessRights', 'admin_set', 'aleph_id', 'alternative', 'aspace_id', 'available', 'biblical_book', 'caption', 'category', 'chapter_and_verse', 'collection_id', 'collection_title', 'company', 'content', 'contentdm_id', 'contributor', 'created_at', 'creator', 'date', 'derived_image', 'description', 'display_format', 'doi', 'ead_id', 'extent', 'extracted_text', 'fcrepo3_pid', 'fits_file', 'format', 'hasPart', 'headline', 'id', 'identifier', 'ingested_by', 'ingestion_date', 'intermediate_file', 'isFormatOf', 'isPartOf', 'issue_number', 'language', 'local_id', 'medium', 'model', 'multires_image', 'nested_path', 'optimistic_lock_token', 'original_filename', 'parent_id', 'parent_title', 'permanent_id', 'permanent_url', 'placement_company', 'product', 'provenance', 'publication', 'publisher', 'relation', 'research_help_contact', 'rights', 'rights_note', 'roles', 'series', 'setting', 'sha1', 'spatial', 'sponsor', 'streamable_media', 'struct_metadata', 'subject', 'thumbnail', 'title', 'tone', 'type', 'updated_at', 'volume', 'workflow_state'].include?(item) }
|
144
|
+
fail ArgumentError, 'invalid value for "fields", must include one of abstract, accessRights, admin_set, aleph_id, alternative, aspace_id, available, biblical_book, caption, category, chapter_and_verse, collection_id, collection_title, company, content, contentdm_id, contributor, created_at, creator, date, derived_image, description, display_format, doi, ead_id, extent, extracted_text, fcrepo3_pid, fits_file, format, hasPart, headline, id, identifier, ingested_by, ingestion_date, intermediate_file, isFormatOf, isPartOf, issue_number, language, local_id, medium, model, multires_image, nested_path, optimistic_lock_token, original_filename, parent_id, parent_title, permanent_id, permanent_url, placement_company, product, provenance, publication, publisher, relation, research_help_contact, rights, rights_note, roles, series, setting, sha1, spatial, sponsor, streamable_media, struct_metadata, subject, thumbnail, title, tone, type, updated_at, volume, workflow_state'
|
145
|
+
end
|
146
|
+
# resource path
|
147
|
+
local_var_path = '/reports/roles'
|
148
|
+
|
149
|
+
# query parameters
|
150
|
+
query_params = {}
|
151
|
+
query_params[:'include_inherited'] = opts[:'include_inherited'] if !opts[:'include_inherited'].nil?
|
152
|
+
query_params[:'collection_id'] = opts[:'collection_id'] if !opts[:'collection_id'].nil?
|
153
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
154
|
+
|
155
|
+
# header parameters
|
156
|
+
header_params = {}
|
157
|
+
# HTTP header 'Accept' (if needed)
|
158
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/csv'])
|
159
|
+
|
160
|
+
# form parameters
|
161
|
+
form_params = {}
|
162
|
+
|
163
|
+
# http body (model)
|
164
|
+
post_body = nil
|
165
|
+
auth_names = ['oauth']
|
166
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
167
|
+
:header_params => header_params,
|
168
|
+
:query_params => query_params,
|
169
|
+
:form_params => form_params,
|
170
|
+
:body => post_body,
|
171
|
+
:auth_names => auth_names,
|
172
|
+
:return_type => 'File')
|
173
|
+
if @api_client.config.debugging
|
174
|
+
@api_client.config.logger.debug "API called: ReportsApi#get_reports_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
175
|
+
end
|
176
|
+
return data, status_code, headers
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|