Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

dpn-admin/dpn-client-swagger

Repository files navigation

swagger_client

SwaggerClient - the Ruby gem for the DPN API

Digital Preservation Network

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 2.0.0
  • Package version: 1.0.0
  • Build date: 2016-08-16T19:08:28.055Z
  • Build package: class io.swagger.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build swagger_client.gemspec

Then either install the gem locally:

gem install ./swagger_client-1.0.0.gem

(for development, run gem install --dev ./swagger_client-1.0.0.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 'swagger_client', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO, then add the following in the Gemfile:

gem 'swagger_client', :git => 'https://github.com/YOUR_GIT_USERNAME/YOUR_GIT_REPO.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 'swagger_client'

api_instance = SwaggerClient::BagApi.new

page = 56 # Integer | Page number to return, starting at 1.  For use  with page_size. 

page_size = 56 # Integer | Max results per page. 

opts = { 
  before: DateTime.parse("2013-10-20T19:20:30+01:00"), # DateTime | Only include records with updated_at **earlier**  than this, inclusive. 
  after: DateTime.parse("2013-10-20T19:20:30+01:00"), # DateTime | Only include records with updated_at **later**  than this, inclusive. 
  bag_type: "bag_type_example", # String | Filter by bag type. Consult the Bag definitions for the supported values. 
  admin_node: "admin_node_example", # String | Filter by admin_node namespace 
  ingest_node: "ingest_node_example", # String | Filter by ingest_node namespace 
  member: "member_example", # String | Filter by member_id
  replicated_by: "replicated_by_example", # String | The namespace of the replicating node on which  to filter.  Multiple filters can be used, separated by comma.  The result will include the union (OR)  of the filtered results. 
  order_by: ["order_by_example"], # Array<String> | Comma separated list of string fields by which to order the response. 
  first_version_uuid: "first_version_uuid_example" # String | Filter by first_version_uuid. 
}

begin
  #List of bags
  result = api_instance.bag_get(page, page_size, opts)
  p result
rescue SwaggerClient::ApiError => e
  puts "Exception when calling BagApi->bag_get: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://localhost

Class Method HTTP request Description
SwaggerClient::BagApi bag_get GET /bag List of bags
SwaggerClient::BagApi bag_post POST /bag Create a bag
SwaggerClient::BagApi bag_uuid_get GET /bag/{uuid} Returns the data for a single bag record matching the uuid.
SwaggerClient::BagApi bag_uuid_put PUT /bag/{uuid} Update the bag
SwaggerClient::BagApi member_member_id_bags_get GET /member/{member_id}/bags Returns the member's bags
SwaggerClient::DigestApi bag_uuid_digest_algorithm_get GET /bag/{uuid}/digest/algorithm Show a specific digest record.
SwaggerClient::DigestApi bag_uuid_digest_get GET /bag/{uuid}/digest List of digests for the specified bag
SwaggerClient::DigestApi bag_uuid_digest_post POST /bag/{uuid}/digest Create a digest for the specified bag
SwaggerClient::DigestApi digest_get GET /digest List of digests
SwaggerClient::FixityCheckApi fixity_check_get GET /fixity_check List of fixity checks
SwaggerClient::FixityCheckApi fixity_check_post POST /fixity_check Create a fixity check
SwaggerClient::IngestApi ingest_get GET /ingest List of ingest records
SwaggerClient::IngestApi ingest_post POST /ingest Create an ingest
SwaggerClient::MemberApi member_get GET /member List of members
SwaggerClient::MemberApi member_member_id_bags_get GET /member/{member_id}/bags Returns the member's bags
SwaggerClient::MemberApi member_member_id_get GET /member/{member_id} Returns the data for a single member record matching the member_id.
SwaggerClient::MemberApi member_member_id_put PUT /member/{member_id} Update the member
SwaggerClient::MemberApi member_post POST /member Create a member
SwaggerClient::NodeApi node_get GET /node List of nodes
SwaggerClient::NodeApi node_namespace_get GET /node/{namespace} Show a specific node
SwaggerClient::NodeApi node_namespace_put PUT /node/{namespace} Update the node
SwaggerClient::ReplicateApi replicate_get GET /replicate List of replication requests
SwaggerClient::ReplicateApi replicate_post POST /replicate Create a replication request
SwaggerClient::ReplicateApi replicate_replication_id_get GET /replicate/{replication_id} Returns the data for a single replication request.
SwaggerClient::ReplicateApi replicate_replication_id_put PUT /replicate/{replication_id} Update the replication request
SwaggerClient::RestoreApi restore_get GET /restore List of restore requests
SwaggerClient::RestoreApi restore_post POST /restore Create a restore request
SwaggerClient::RestoreApi restore_restore_id_get GET /restore/{restore_id} Returns the data for a single restore request.
SwaggerClient::RestoreApi restore_restore_id_put PUT /restore/{restore_id} Update the restore request

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

About

Swagger codegen for dpn-client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published