# tripfinder

> Find trips.

Latest version **0.1.0** (published 2016-01-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install tripfinder
pnpm add tripfinder
yarn add tripfinder
bun add tripfinder
```

## Health

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

Positive: no vulnerabilities.

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

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2016-01-31 |
| First published | 2016-01-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | dhuanco@gmail.com |
| Maintainers | dhuan |

## Links

- npm: https://www.npmjs.com/package/tripfinder
- npm.io page: https://npm.io/package/tripfinder

## Dependencies (2)

- [ngeohash](https://npm.io/package/ngeohash.md) git://github.com/tripda/node-geohash.git
- [request-promise](https://npm.io/package/request-promise.md) ^1.0.2

## Recent versions

- 0.1.0 (latest) — 2016-01-31

## README

# TripFinder

[![Build Status](https://travis-ci.org/tripda/tripfinder.png?branch=master)](https://travis-ci.org/tripda/tripfinder)

TripFinder is a JavaScript tool for searching and retrieving car rides, stored in carpooling platform Tripda's database.

## Installation

### NodeJS

```sh
npm install https://github.com/tripda/tripfinder
```

### AngularJS

```sh
bower install https://github.com/tripda/tripfinder
```

## Requirements

In order to use TripFinder you need to [get a Google Places API Key](https://developers.google.com/places/web-service/get-api-key). This key can be obtained for free, you only need a Google account. 

## Usage

### NodeJS

```javascript
var finder = require('tripfinder');

finder.setGeocoderKey('YOUR-KEY');

finder.setOrigin('Sao Paulo, SP, Brazil');

finder.setDestination('Rio de Janeiro, RJ, Brazil');

finder.find()
    .then(function(trips) {

        if (trips.length == 0) {

            // No trips were found...

            return;

        }

        console.log(trips.length + ' trips were found.');

        trips.forEach(function(trip) {

            var driver = trip.getDriver();

            console.log('From: ' + trip.getOriginAddress());
            console.log('To: ' + trip.getDestinationAddress());
            console.log('Driver: ' + driver.getName());
            console.log("\n");

        });

    });
```

### AngularJS

(To do...)

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