Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

conversiontools

1.0.0 • Public • Published

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

install

npm i conversiontools

Downloadsweekly downloads

7

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability