Skip to content

shaneodavey/optimoroute-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OptimoRoute logo

OptimoRoute API client

Features

  • Built-in TypeScript support, including intellisense and type safety.
  • Works both with Node.js and directly in the browser.
  • Only 1 dependency, isomorphic-unfetch to support older browsers.

About

Getting started

Installation

Download from NPM

npm install optimoroute-client

or build it yourself

git clone https://github.com/rokala/optimoroute-client.git
cd ./optimoroute-client
npm install

Credentials

You need a API authentication key provided by OptimoRoute

Usage

// Import the module
import OptimoRoute from 'optimoroute-client';

// Initialize the client, never expose your key to the public
const api = new OptimoRoute({
  authKey: '<YourOptimoRouteApiKey>'
});

// Some example requests
api.getOrders('SomeOrderNumber-123')
  .then((response) => {
      // do stuff...
  });

api.getSchedulingInfo('SomeOrderNumber-123')
  .then((response) => {
    // do stuff...
  });

api.getRoutes({ date: '2021-10-01' })
  .then((response) => {
    // do stuff...
  });

api.updateDriverParameters({ externalId: 'SomeDriverID-123', date: '2020-10-01', enabled: false })
  .then((response) => {
    // do stuff...
  });

About

A lightweight TypeScript WS API client/wrapper for OptimoRoute, a online route optimizing service.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 100.0%