ddr_client
DdrClient - the Ruby gem for the Duke Digital Repository API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
This SDK is automatically generated by the Swagger Codegen project:
- API version: v1
- Package version: 2.0.0.d9f2bd2b
- Build package: io.swagger.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
gem build ddr_client.gemspec
Then either install the gem locally:
gem install ./ddr_client-2.0.0.d9f2bd2b.gem
(for development, run gem install --dev ./ddr_client-2.0.0.d9f2bd2b.gem to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'ddr_client', '~> 2.0.0.d9f2bd2b'
Install from Git
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:
gem 'ddr_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'ddr_client'
# Setup authorization
DdrClient.configure do |config|
# Configure API key authorization: oauth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = DdrClient::BatchObjectsApi.new
opts = {
resource_id: 'resource_id_example', # String | Filter by resource ID
type: 'type_example', # String | Filter by batch object type
model: ['model_example'], # Array<String> | Filter by models(s)
per_page: nil, # Object | JSON only: Number of records to return per page (default: 20)
page: nil # Object | JSON only: Page number of results to return (default: 1)
}
begin
result = api_instance.get_batch_objects(opts)
p result
rescue DdrClient::ApiError => e
puts "Exception when calling BatchObjectsApi->get_batch_objects: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://example.org/api
| Class | Method | HTTP request | Description |
|---|---|---|---|
| DdrClient::BatchObjectsApi | get_batch_objects | GET /batch_objects | |
| DdrClient::BatchObjectsApi | get_batch_objects_id | GET /batch_objects/id | |
| DdrClient::BatchesApi | get_batches | GET /batches | |
| DdrClient::BatchesApi | get_batches_id | GET /batches/id | |
| DdrClient::BatchesApi | get_batches_id_batch_objects | GET /batches/id/batch_objects | |
| DdrClient::BatchesApi | get_batches_id_log | GET /batches/id/log | |
| DdrClient::BatchesApi | get_batches_id_messages | GET /batches/id/messages | |
| DdrClient::EventsApi | get_events | GET /events | |
| DdrClient::EventsApi | get_events_id | GET /events/id | |
| DdrClient::GroupsApi | get_groups | GET /groups | |
| DdrClient::IndexApi | delete_index_id | DELETE /index/id | |
| DdrClient::IndexApi | get_index_id | GET /index/id | |
| DdrClient::IndexApi | get_index_schema | GET /index/schema | |
| DdrClient::QueuesApi | delete_queues_locks | DELETE /queues/locks | |
| DdrClient::QueuesApi | get_queues_stats | GET /queues/stats | |
| DdrClient::ReportsApi | get_reports_collection_summary | GET /reports/collection_summary | |
| DdrClient::ReportsApi | get_reports_duplicate_content | GET /reports/duplicate_content | |
| DdrClient::ReportsApi | get_reports_roles | GET /reports/roles | |
| DdrClient::ResourcesApi | get_resources | GET /resources | |
| DdrClient::ResourcesApi | get_resources_by_role | GET /resources/by_role | |
| DdrClient::ResourcesApi | get_resources_id | GET /resources/id | |
| DdrClient::ResourcesApi | get_resources_id_attachments | GET /resources/id/attachments | |
| DdrClient::ResourcesApi | get_resources_id_batches | GET /resources/id/batches | |
| DdrClient::ResourcesApi | get_resources_id_children | GET /resources/id/children | |
| DdrClient::ResourcesApi | get_resources_id_download | GET /resources/id/download | |
| DdrClient::ResourcesApi | get_resources_id_files_slug | GET /resources/id/files/slug | |
| DdrClient::ResourcesApi | get_resources_id_fixity | GET /resources/id/fixity | Perform a fixity check on the resource |
| DdrClient::ResourcesApi | get_resources_id_members | GET /resources/id/members | Get members of a Collection |
| DdrClient::ResourcesApi | get_resources_id_permanent_id | GET /resources/id/permanent_id | |
| DdrClient::ResourcesApi | get_resources_id_permissions | GET /resources/id/permissions | |
| DdrClient::ResourcesApi | get_resources_id_targets | GET /resources/id/targets | |
| DdrClient::ResourcesApi | get_resources_id_technical_metadata | GET /resources/id/technical_metadata | |
| DdrClient::ResourcesApi | patch_resources_id | PATCH /resources/id | |
| DdrClient::ResourcesApi | post_resources | POST /resources | |
| DdrClient::SchemaApi | get_schema_event | GET /schema/event | |
| DdrClient::SchemaApi | get_schema_resource | GET /schema/resource | |
| DdrClient::SchemaApi | get_schema_user | GET /schema/user | |
| DdrClient::UsersApi | get_users | GET /users | |
| DdrClient::UsersApi | get_users_id | GET /users/id |
Documentation for Models
- DdrClient::DdrAPIBatchEntity
- DdrClient::DdrAPIBatchEntityLogfile
- DdrClient::DdrAPIBatchObjectAttributeEntity
- DdrClient::DdrAPIBatchObjectDatastreamEntity
- DdrClient::DdrAPIBatchObjectEntity
- DdrClient::DdrAPIBatchObjectMessageEntity
- DdrClient::DdrAPIBatchObjectRelationshipEntity
- DdrClient::DdrAPIBatchObjectRoleEntity
- DdrClient::DdrAPIEventEntity
- DdrClient::DdrAPIFileEntity
- DdrClient::DdrAPIGroupEntity
- DdrClient::DdrAPIGroupMemberEntity
- DdrClient::DdrAPILinkEntity
- DdrClient::DdrAPIResourceEntity
- DdrClient::DdrAPIResourceEntityFiles
- DdrClient::DdrAPIResourceEntityMetadata
- DdrClient::DdrAPIResourceEntityRelated
- DdrClient::DdrAPIRoleEntity
- DdrClient::DdrAPITechnicalMetadataEntity
- DdrClient::DdrAPIUserEntity
- DdrClient::PatchResources
- DdrClient::PatchResourcesMetadata
- DdrClient::PatchResourcesRelated
- DdrClient::PatchResourcesRoles
- DdrClient::PostResources
Documentation for Authorization
oauth
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header