Skip to content

Commit

Permalink
DOC: fix badges, fix README, update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkoryukov committed Feb 15, 2017
1 parent ff9d2c7 commit f11ab03
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 62 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ This is the history of changes of the `route4me-node` package
## unreleased // ???

* Can return `Promise` instead of callbacks (option `promise`)
## 2015-02-16 // 0.2.0

* Completely rewritten SDK, all methods splitted to namespaces:
* AddressBook
* Routes
* ActivityFeed
* Vehicles
* ...
* **Promisified** version exists: just pass an appropriate config.option
* Less NPM-dependencies
* Self documented with JSDoc

## 2015-08-28 // 0.1.1

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Access Route4Me's logistics-as-a-service API using our Node.js SDK
[![Build Status](https://travis-ci.org/route4me/route4me-nodejs-sdk.svg?branch=master)](https://travis-ci.org/route4me/route4me-nodejs-sdk)
[![Build status](https://ci.appveyor.com/api/projects/status/t292y0ywsri2x4el?svg=true)](https://ci.appveyor.com/project/maxkoryukov/route4me-nodejs-sdk-oga5i)

[![npm version](https://img.shields.io/npm/v/route4me-node.svg)](https://www.npmjs.com/package/route4me-node)
[![npm downloads](https://img.shields.io/npm/dm/route4me-node.svg)](https://www.npmjs.com/package/route4me-node)

[![codebeat badge](https://codebeat.co/badges/79f229c5-27f7-4ab9-8503-2d6fc95052f9)](https://codebeat.co/projects/github-com-route4me-route4me-nodejs-sdk)
[![bitHound Overall Score](https://www.bithound.io/github/route4me/route4me-nodejs-sdk/badges/score.svg)](https://www.bithound.io/github/route4me/route4me-nodejs-sdk)
[![bitHound Dependencies](https://www.bithound.io/github/route4me/route4me-nodejs-sdk/badges/dependencies.svg)](https://www.bithound.io/github/route4me/route4me-nodejs-sdk/master/dependencies/npm)
Expand Down
64 changes: 3 additions & 61 deletions tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ NPM package: `route4me-node`
[![Build Status](https://travis-ci.org/route4me/route4me-nodejs-sdk.svg?branch=master)](https://travis-ci.org/route4me/route4me-nodejs-sdk)
[![Build status](https://ci.appveyor.com/api/projects/status/t292y0ywsri2x4el?svg=true)](https://ci.appveyor.com/project/maxkoryukov/route4me-nodejs-sdk-oga5i)

[![npm version](https://img.shields.io/npm/v/route4me-node.svg)](https://www.npmjs.com/package/route4me-node)
[![npm downloads](https://img.shields.io/npm/dm/route4me-node.svg)](https://www.npmjs.com/package/route4me-node)

[![bitHound Overall Score](https://www.bithound.io/github/route4me/route4me-nodejs-sdk/badges/score.svg)](https://www.bithound.io/github/route4me/route4me-nodejs-sdk)
[![bitHound Dependencies](https://www.bithound.io/github/route4me/route4me-nodejs-sdk/badges/dependencies.svg)](https://www.bithound.io/github/route4me/route4me-nodejs-sdk/master/dependencies/npm)
[![codecov](https://codecov.io/gh/route4me/route4me-nodejs-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/route4me/route4me-nodejs-sdk)
Expand All @@ -22,64 +25,3 @@ This is official NodeJS/javascript SDK for Route4Me API.
```shell
npm install --save route4me-node
```

## Example

### Single Driver Route Optimization

**OBSOLETE**

```javascript
var api_key = '11111111111111111111111111111111'
, route4me = require('..')(api_key)
, addresses = require('./addresses.json');

var params = {
addresses: addresses
, parameters:{
algorithm_type: 1
, distance_unit: 'mi'
, device_type: 'web'
, optimize: 'Distance'
, travel_mode: 'Driving'
, route_max_duration: 86400
, vehicle_capacity: 1
, vehicle_max_distance_mi: 10000
, rt: true
}
};

route4me.OptimizationProblem.optimize(params, function(err, problem) {
console.log(err, problem);
});
```

### Multiple Depot Multiple driver route optimization

**OBSOLETE**


```javascript
var api_key = '11111111111111111111111111111111'
, route4me = require('..')(api_key)
, addresses = require('./addresses.json');

var params = {
addresses: addresses
, parameters:{
algorithm_type: 4
, distance_unit: 'mi'
, device_type: 'web'
, optimize: 'Distance'
, travel_mode: 'Driving'
, route_max_duration: 86400
, vehicle_capacity: 50
, vehicle_max_distance_mi: 10000
, parts: 50
}
};

route4me.OptimizationProblem.optimize(params, function(err, problem) {
console.log(err, problem);
});
```

0 comments on commit f11ab03

Please sign in to comment.