A NodeJS wrapper for Vector Express, an API that allows you to convert, analyze and process vector files. Works for both public endpoints and paid metered endpoints by supplying your Bearer token.
npm install @vector-express/sdk
-
get
- makes a GET request to a certain url.- parameters :
- url - url to be requested
- format (optional) - if 'full', returns all info about communication with a server.
- parameters :
-
post
- makes a POST request to a certain url.- parameters :
- url - url to be requested
- data (optional) - data to be sent a server.
- parameters :
-
convert
- convert a file from one format to another.- parameters :
- obligatory :
- inputFormat
- outputFormat
- optional :
- options - options map.
- options.file - file to be sent for conversion.
- options.transformers - transformers to be used for conversion
- options.params - parameters of request ( options for conversion, use-file to use it from a server )
- options.token - Bearer token to be sent for authentication.
- options.save - if true, file is saved to options.path, ortherwise url of the file location is returned.
- options.path - path where to save converted file.
- obligatory :
Either
options.file
oroptions.params[ 'use-file' ]
must be specified - parameters :
-
process
- process a file.- parameters :
- obligatory :
- format
- processors - to be used for conversion
- optional :
- options - options map.
- options.file - file to be sent for conversion.
- options.params - parameters of request ( options for processors, use-file to use it from a server )
- options.token - Bearer token to be sent for authentication.
- options.save - if true, file is saved to options.path, ortherwise url of the file location is returned.
- options.path - path where to save converted file.
- obligatory :
Either
options.file
oroptions.params[ 'use-file' ]
must be specified - parameters :
-
analyze
- analyze a file.- parameters :
- obligatory :
- format
- analyzers - to be used for conversion
- optional :
- options - options map.
- options.file - file to be sent for conversion.
- options.params - parameters of request ( options for analyzers, use-file to use it from a server )
- options.token - Bearer token to be sent for authentication.
- obligatory :
Either
options.file
oroptions.params[ 'use-file' ]
must be specified - parameters :