0.1.0 • Published 7 years ago

paperdb-client v0.1.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
7 years ago

paperdb-client

PaperdbClient - JavaScript client for paperdb-client PaperDB is a web service and application for storing your digital literature. This page contains the RESTfull API specification that any service implementing the PaperDB protocol should follow. Developers can also use this specification to connect their own app to PaperDB services. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 0.1.0
  • Package version: 0.1.0
  • Build date: 2017-02-26T14:30:53.913+01:00
  • Build package: class io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install paperdb-client --save

git

If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Getting Started

Please follow the installation instruction and execute the following JS code:

var PaperdbClient = require('paperdb-client');

var api = new PaperdbClient.FilesApi()

var uuid = "uuid_example"; // {String} 

var hash = "hash_example"; // {String} 

api.deleteFile(uuid, hash).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to http://localhost:8880/

ClassMethodHTTP requestDescription
PaperdbClient.FilesApideleteFileDELETE /person/{uuid}/file/{hash}
PaperdbClient.FilesApigetFileContentGET /file/{hash}/content
PaperdbClient.FilesApigetFileMetadataGET /person/{uuid}/file/{hash}
PaperdbClient.FilesApilistPersonFilesPOST /person/{uuid}/files
PaperdbClient.FilesApireplaceFileMetadataPUT /person/{uuid}/file/{hash}
PaperdbClient.FilesApiupdateFileMetadataPATCH /person/{uuid}/file/{hash}
PaperdbClient.OrganizationsApiaddOrgMemberPOST /org/{uuid}/members
PaperdbClient.OrganizationsApicreateOrgPOST /orgs
PaperdbClient.OrganizationsApideleteOrgDELETE /orgs/{uuid}
PaperdbClient.OrganizationsApifetchOrgGET /orgs/{uuid}
PaperdbClient.OrganizationsApigetOrgMembersGET /org/{uuid}/members
PaperdbClient.OrganizationsApilistOrgsGET /orgs
PaperdbClient.OrganizationsApiremoveOrgMemberDELETE /org/{uuid}/members
PaperdbClient.OrganizationsApireplaceOrgPATCH /orgs/{uuid}
PaperdbClient.OrganizationsApiupdateOrgPUT /orgs/{uuid}
PaperdbClient.PeopleApicreatePersonPOST /persons
PaperdbClient.PeopleApideletePersonDELETE /person/{uuid}
PaperdbClient.PeopleApifetchPersonGET /person/{uuid}
PaperdbClient.PeopleApigetResourceDetailsGET /person/{uuid}/resources
PaperdbClient.PeopleApilistPersonsGET /persons
PaperdbClient.PeopleApipersonUuidPermissionsGetGET /person/{uuid}/permissionsGet all of the person's permissions
PaperdbClient.PeopleApipersonUuidPermissionsPostPOST /person/{uuid}/permissionsGrant a permission to the given person
PaperdbClient.PeopleApireplacePersonPUT /person/{uuid}
PaperdbClient.PeopleApiupdatePersonPATCH /person/{uuid}
PaperdbClient.PermissionsApipersonUuidPermissionsGetGET /person/{uuid}/permissionsGet all of the person's permissions
PaperdbClient.PermissionsApipersonUuidPermissionsPostPOST /person/{uuid}/permissionsGrant a permission to the given person
PaperdbClient.ResourcesApiaddResourcePOST /resources
PaperdbClient.ResourcesApifetchResourceGET /resource/{uuid}
PaperdbClient.ResourcesApigetResourceDetailsGET /person/{uuid}/resources
PaperdbClient.ResourcesApilistAllResourcesGET /resources
PaperdbClient.ResourcesApiresourceUuidDeleteDELETE /resource/{uuid}
PaperdbClient.ResourcesApiresourceUuidPatchPATCH /resource/{uuid}
PaperdbClient.ResourcesApiresourceUuidPostPOST /resource/{uuid}
PaperdbClient.ResourcesApiresourceUuidPutPUT /resource/{uuid}

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.