# routing-api

> An asynchronous client library for trafic routing.

Latest version **2.0.0** (published 2018-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install routing-api
pnpm add routing-api
yarn add routing-api
bun add routing-api
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-04-16 |
| First published | 2018-04-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Julien Gobillot |
| Maintainers | jgobillot |

## Links

- npm: https://www.npmjs.com/package/routing-api
- Repository: https://github.com/jgobillot/routing-api
- Homepage: https://github.com/jgobillot/routing-api#readme
- Issues: https://github.com/jgobillot/routing-api/issues
- npm.io page: https://npm.io/package/routing-api

## Dependencies (2)

- [request](https://npm.io/package/request.md) ^2.85.0
- [deep-extend](https://npm.io/package/deep-extend.md) ^0.5.0

## Recent versions

- 2.0.0 (latest) — 2018-04-16
- 1.0.0 — 2018-04-15

## README

# Routing API 2.0.0

```javascript
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.

```javascript
client.get(path, params);
```

You can use the defined client methods to call endpoints.

### With client methods

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

## Promises

The request will return Promise.

```javascript
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;
  });
```

---
_Source: https://npm.io/package/routing-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
