Socket
Book a DemoInstallSign in
Socket

ddr_client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ddr_client

2.0.0.d9f2bd2b
bundlerRubygems
Version published
Maintainers
1
Created
Source

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

ClassMethodHTTP requestDescription
DdrClient::BatchObjectsApiget_batch_objectsGET /batch_objects
DdrClient::BatchObjectsApiget_batch_objects_idGET /batch_objects/{id}
DdrClient::BatchesApiget_batchesGET /batches
DdrClient::BatchesApiget_batches_idGET /batches/{id}
DdrClient::BatchesApiget_batches_id_batch_objectsGET /batches/{id}/batch_objects
DdrClient::BatchesApiget_batches_id_logGET /batches/{id}/log
DdrClient::BatchesApiget_batches_id_messagesGET /batches/{id}/messages
DdrClient::EventsApiget_eventsGET /events
DdrClient::EventsApiget_events_idGET /events/{id}
DdrClient::GroupsApiget_groupsGET /groups
DdrClient::IndexApidelete_index_idDELETE /index/{id}
DdrClient::IndexApiget_index_idGET /index/{id}
DdrClient::IndexApiget_index_schemaGET /index/schema
DdrClient::QueuesApidelete_queues_locksDELETE /queues/locks
DdrClient::QueuesApiget_queues_statsGET /queues/stats
DdrClient::ReportsApiget_reports_collection_summaryGET /reports/collection_summary
DdrClient::ReportsApiget_reports_duplicate_contentGET /reports/duplicate_content
DdrClient::ReportsApiget_reports_rolesGET /reports/roles
DdrClient::ResourcesApiget_resourcesGET /resources
DdrClient::ResourcesApiget_resources_by_roleGET /resources/by_role
DdrClient::ResourcesApiget_resources_idGET /resources/{id}
DdrClient::ResourcesApiget_resources_id_attachmentsGET /resources/{id}/attachments
DdrClient::ResourcesApiget_resources_id_batchesGET /resources/{id}/batches
DdrClient::ResourcesApiget_resources_id_childrenGET /resources/{id}/children
DdrClient::ResourcesApiget_resources_id_downloadGET /resources/{id}/download
DdrClient::ResourcesApiget_resources_id_files_slugGET /resources/{id}/files/{slug}
DdrClient::ResourcesApiget_resources_id_fixityGET /resources/{id}/fixityPerform a fixity check on the resource
DdrClient::ResourcesApiget_resources_id_membersGET /resources/{id}/membersGet members of a Collection
DdrClient::ResourcesApiget_resources_id_permanent_idGET /resources/{id}/permanent_id
DdrClient::ResourcesApiget_resources_id_permissionsGET /resources/{id}/permissions
DdrClient::ResourcesApiget_resources_id_targetsGET /resources/{id}/targets
DdrClient::ResourcesApiget_resources_id_technical_metadataGET /resources/{id}/technical_metadata
DdrClient::ResourcesApipatch_resources_idPATCH /resources/{id}
DdrClient::ResourcesApipost_resourcesPOST /resources
DdrClient::SchemaApiget_schema_eventGET /schema/event
DdrClient::SchemaApiget_schema_resourceGET /schema/resource
DdrClient::SchemaApiget_schema_userGET /schema/user
DdrClient::UsersApiget_usersGET /users
DdrClient::UsersApiget_users_idGET /users/{id}

Documentation for Models

Documentation for Authorization

oauth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

FAQs

Package last updated on 26 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.