Class: DdrClient::ReportsApi
- Inherits:
-
Object
- Object
- DdrClient::ReportsApi
- Defined in:
- lib/ddr_client/api/reports_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_reports_collection_summary(opts = {}) ⇒ File
Collection summary report.
-
#get_reports_collection_summary_with_http_info(opts = {}) ⇒ Array<(File, Fixnum, Hash)>
Collection summary report.
-
#get_reports_duplicate_content(opts = {}) ⇒ File
Duplicate content report.
-
#get_reports_duplicate_content_with_http_info(opts = {}) ⇒ Array<(File, Fixnum, Hash)>
Duplicate content report.
-
#get_reports_roles(opts = {}) ⇒ File
Roles report.
-
#get_reports_roles_with_http_info(opts = {}) ⇒ Array<(File, Fixnum, Hash)>
Roles report.
-
#initialize(api_client = ApiClient.default) ⇒ ReportsApi
constructor
A new instance of ReportsApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ReportsApi
Returns a new instance of ReportsApi.
19 20 21 |
# File 'lib/ddr_client/api/reports_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/ddr_client/api/reports_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_reports_collection_summary(opts = {}) ⇒ File
Collection summary report
26 27 28 29 |
# File 'lib/ddr_client/api/reports_api.rb', line 26 def get_reports_collection_summary(opts = {}) data, _status_code, _headers = get_reports_collection_summary_with_http_info(opts) data end |
#get_reports_collection_summary_with_http_info(opts = {}) ⇒ Array<(File, Fixnum, Hash)>
Collection summary report
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/ddr_client/api/reports_api.rb', line 35 def get_reports_collection_summary_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportsApi.get_reports_collection_summary ...' end 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) } 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' end # resource path local_var_path = '/reports/collection_summary' # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/csv']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportsApi#get_reports_collection_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_reports_duplicate_content(opts = {}) ⇒ File
Duplicate content report
76 77 78 79 |
# File 'lib/ddr_client/api/reports_api.rb', line 76 def get_reports_duplicate_content(opts = {}) data, _status_code, _headers = get_reports_duplicate_content_with_http_info(opts) data end |
#get_reports_duplicate_content_with_http_info(opts = {}) ⇒ Array<(File, Fixnum, Hash)>
Duplicate content report
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/ddr_client/api/reports_api.rb', line 85 def get_reports_duplicate_content_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportsApi.get_reports_duplicate_content ...' end 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) } 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' end # resource path local_var_path = '/reports/duplicate_content' # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/csv']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportsApi#get_reports_duplicate_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_reports_roles(opts = {}) ⇒ File
Roles report
128 129 130 131 |
# File 'lib/ddr_client/api/reports_api.rb', line 128 def get_reports_roles(opts = {}) data, _status_code, _headers = get_reports_roles_with_http_info(opts) data end |
#get_reports_roles_with_http_info(opts = {}) ⇒ Array<(File, Fixnum, Hash)>
Roles report
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/ddr_client/api/reports_api.rb', line 139 def get_reports_roles_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportsApi.get_reports_roles ...' end 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) } 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' end # resource path local_var_path = '/reports/roles' # query parameters query_params = {} query_params[:'include_inherited'] = opts[:'include_inherited'] if !opts[:'include_inherited'].nil? query_params[:'collection_id'] = opts[:'collection_id'] if !opts[:'collection_id'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/csv']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportsApi#get_reports_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |