1.0.4 • Published 3 years ago

docxlib_js v1.0.4

Weekly downloads
-
License
Unlicense
Repository
github
Last release
3 years ago

docxlib_js

DocxlibJs - JavaScript client for docxlib_js.\ This library can be used to transfer files from one storage service to another.\ Currently integrated data sources - Google Drive \ Currently integrated data destinations - S3 buckets\

NOTE : Digimocker is a just a mock service that we have integrated with, can only be used for testing out/playing with the lib.\

Visit this link for an exhaustive documentation + examples of using this library.

Install it via:

npm install docxlib_js --save

Getting Started

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

var DocxlibJs = require('docxlib_js');


var api = new DocxlibJs.DestinationsApi()
var opts = {
  's3Credentials': new DocxlibJs.S3Credentials() // {S3Credentials} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.s3StorageListBuckets(opts, callback);

Documentation for API Endpoints

All URIs are relative to https://docxlib-backend.herokuapp.com

ClassMethodHTTP requestDescription
DocxlibJs.DestinationsApis3StorageListBucketsPOST /destination/s3/listBucketsList all s3 buckets associated with given aws credentials
DocxlibJs.SourcesApidigiMockerSourceAuthCallbackPOST /source/digimocker/oauth2callbackReturns oauth token from digimocker login url
DocxlibJs.SourcesApidigimockerSourceAuthGET /source/digimocker/authGet Digimocker Auth Url
DocxlibJs.SourcesApidigimockerSourceListFilesPOST /source/digimocker/listFilesGet list of all files in authenticated user's digimocker account
DocxlibJs.SourcesApigDriveSourceAuthPOST /source/gdrive/authGet Google Drive Auth Url
DocxlibJs.SourcesApigDriveSourceAuthCallbackPOST /source/gdrive/oauth2callbackReturns oauth token from google callback url
DocxlibJs.SourcesApigDriveSourceListFilesPOST /source/gdrive/listFilesGet list of all files in authenticated user's google drive
DocxlibJs.TransferApifileTransferPOST /docTransferEndpoint to transfer chosen file from a source to destination storage

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.