Conversion Tools API NodeJS client
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
.eslintrc.js
.gitignore
.npmignore
LICENSE
README.md
index.js
package.json
yarn.lock

README.md

Conversion Tools API Node.js Client

Conversion Tools is an online service which offers fast and easy way to convert documents between different formats, like XML, Excel, PDF, Word, Text, CSV and others.

This Node.js Client allows to integrate the conversion of the files into your node.js applications. To convert the files Node.js Client uses the public Conversion Tools REST API.

Installation

yarn add conversiontools

or

npm install --save conversiontools

Examples

To use REST API - get API Token from the Profile page at https://conversiontools.io/profile.

const ConversionClient = require('conversiontools');

// API Token from your Profile page at https://conversiontools.io/profile
const apiToken = 'put the api token here';

const conversion = new ConversionClient(apiToken);

conversion
  .run('convert.xml_to_csv', {
    filename: 'test.xml',
    timeout: 4000,
    outputFilename: 'test.xml.csv',
    options: {
      delimiter: 'tab',
    },
  })
  .then((filename) => {
    console.log('File downloaded to', filename);
  })
  .catch(err => {
    console.log('Conversion error', err);
  });

Documentation

List of available Conversion Types and corresponding conversion options can be found on the Conversion Tools API Documentation page.

License

Licensed under MIT.

Copyright (c) 2018 Conversion Tools