Skip to content

vector-express/vx-sdk-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d0971b7 · Jan 27, 2024

History

2 Commits
May 18, 2023
Jan 27, 2024
Jan 27, 2024
May 18, 2023
May 18, 2023
May 18, 2023
May 18, 2023
May 18, 2023
May 18, 2023
May 18, 2023
May 18, 2023
May 18, 2023
May 18, 2023
May 18, 2023
Jan 27, 2024
Jan 27, 2024
Jan 27, 2024

Repository files navigation

@vector-express/sdk

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.

Installation

npm install @vector-express/sdk

Interface

  • 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.
  • post - makes a POST request to a certain url.

    • parameters :
      • url - url to be requested
      • data (optional) - data to be sent a server.
  • 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.

    Either options.file or options.params[ 'use-file' ] must be specified

  • 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.

    Either options.file or options.params[ 'use-file' ] must be specified

  • 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.

    Either options.file or options.params[ 'use-file' ] must be specified