# node-jcdecaux

> nodejs client for JCDecaux Open Data

Latest version **3.0.4** (published 2019-12-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-jcdecaux
pnpm add node-jcdecaux
yarn add node-jcdecaux
bun add node-jcdecaux
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.4 |
| Published | 2019-12-13 |
| First published | 2014-05-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 99 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Touzet David |
| Maintainers | eyolas |
| Keywords | jcdecaux |

## Links

- npm: https://www.npmjs.com/package/node-jcdecaux
- Repository: https://github.com/eyolas/node-jcdecaux
- Issues: https://github.com/eyolas/node-jcdecaux/issues
- npm.io page: https://npm.io/package/node-jcdecaux

## Dependencies (1)

- [request](https://npm.io/package/request.md) ^2.88.0

## Recent versions

- 3.0.4 (latest) — 2019-12-13
- 3.0.3 — 2019-06-26
- 3.0.2 — 2019-06-25
- 3.0.0 — 2017-02-12
- 2.0.1 — 2016-09-09
- 2.0.0 — 2016-04-17
- 1.1.4 — 2014-10-20
- 1.1.3 — 2014-09-23
- 1.1.2 — 2014-08-13
- 1.1.1 — 2014-05-30
- 1.1.0 — 2014-05-30
- 1.0.1 — 2014-05-27
- 1.0.0 — 2014-05-21

## README

[![Build Status][build-image]][build-url]
[![NPM version][npm-image]][npm-url]
[![Dependency Status][gemnasium-image]][gemnasium-url]

## nodejs client for JCDecaux Open Data

This project is a client libray for JC Decaux Open Data. In order to use this API, you need to get a key at http://developer.jcdecaux.com.

## Installation

```
$ npm install node-jcdecaux
```

## historic:
see [historic](history.md)

## Usage

```js
var JCDecaux = require('node-jcdecaux').JCDecaux;
var Api = new JCDecaux(APIKEY)
```

/!\ for old nodejs or for browser, include a promise polyfill ([promise-polyfill][promise-polyfill-url], [yaku][yaku-url]) or [es6-shim][es6-shim-url]

## Features

All method return promise.

### constructor(apiKey, options)

The first parameter is required. All others are optional

* `apiKey` - api key (for get a key go http://developer.jcdecaux.com) - Required
* `options` - options :
  - `contractName` - set the default contract for all method - Optional
  - `urlApi` - url of JCDecaux api (default: `https://api.jcdecaux.com/vls/v1/`) - Optional
  - `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request

### getContracts()

Get the contract list

### getStation(stationId, contractName)

Get station information

* `stationId` - id of the station - Required
* `contractName` - contract name - Optional if set on init

### getStations()

Get the station list

### getStationsByContract(contractName)

Get the stations of a contract

* `contractName` - contract name - Optional if set on init

## Example

```js
var JCDecaux = require('node-jcdecaux').JCDecaux;
var apiKey = 'your api key';

var Api = new JCDecaux(apiKey);

Api.getContracts().then(function(result) {
  console.log(result);
});

```

## Run tests

```Shell
APIKEY=yourapikey npm test
```

## Authors

  - [David Touzet](https://github.com/eyolas)

# License

  MIT

[build-image]: https://travis-ci.org/eyolas/node-jcdecaux.svg?branch=master
[build-url]: https://travis-ci.org/eyolas/node-jcdecaux
[npm-image]: https://img.shields.io/npm/v/node-jcdecaux.svg?style=flat-square
[npm-url]: https://github.com/eyolas/node-jcdecaux
[gemnasium-image]: http://img.shields.io/gemnasium/eyolas/node-jcdecaux.svg?style=flat-square
[gemnasium-url]: https://gemnasium.com/eyolas/node-jcdecaux
[promise-polyfill-url]:https://github.com/taylorhakes/promise-polyfill
[yaku-url]:https://github.com/ysmood/yaku
[es6-shim-url]:https://github.com/paulmillr/es6-shim

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