Skip to content
This repository has been archived by the owner on Apr 17, 2021. It is now read-only.
/ routing-api Public archive

An asynchronous client library for trafic routing.

License

Notifications You must be signed in to change notification settings

j5lien/routing-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Routing API 2.0.0

const RoutingApi = require('routing-api');

const client = new RoutingApi();

client.routing('x:2.352222 y:48.856614', 'x:-0.5791800 y:44.837789')
  .then(console.log)
  .catch(console.error);;

Installation

npm install routing-api

Requests

With endpoints

You now have the ability to make GET requests against the API via the convenience methods.

client.get(path, params);

You can use the defined client methods to call endpoints.

With client methods

client.routing('x:2.352222 y:48.856614', 'x:-0.5791800 y:44.837789');

Promises

The request will return Promise.

client.routing('x:2.352222 y:48.856614', 'x:-0.5791800 y:44.837789')
  .then(function (data) {
    console.log(data);
  })
  .catch(function (e) {
    throw e;
  });

About

An asynchronous client library for trafic routing.

Resources

License

Stars

Watchers

Forks

Packages

No packages published