# googleplacesapi-0.0.3

> Node.js library for the Google Places API

Latest version **0.0.3** (published 2015-07-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install googleplacesapi-0.0.3
pnpm add googleplacesapi-0.0.3
yarn add googleplacesapi-0.0.3
bun add googleplacesapi-0.0.3
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2015-07-27 |
| First published | 2015-07-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ramsey D'silva |
| Maintainers | tiagobraga |
| Keywords | googleplaces, api |

## Links

- npm: https://www.npmjs.com/package/googleplacesapi-0.0.3
- Repository: https://github.com/tiagobsbraga/googleplacesapi
- Homepage: https://github.com/ramseydsilva/googleplacesapi
- Issues: https://github.com/ramseydsilva/googleplacesapi/issues
- npm.io page: https://npm.io/package/googleplacesapi-0.0.3

## Dependencies (2)

- [xtend](https://npm.io/package/xtend.md) ^2.2.0
- [request](https://npm.io/package/request.md) ^2.34.0

## Recent versions

- 0.0.3 (latest) — 2015-07-27

## README

Google Places API Client
========================

Node.js library for the Google Places API. Official docs [here][docs]


Install
-------
`npm install googleplacesapi`


Usage
-----
```
var googleplacesapi = require('googleplacesapi');

gpa = new googleplacesapi({key: secrets.serverKey});

gpa.text({query: 'Big Slice, Toronto'}, function(err, res) {
    if (!err) {
        console.log(res); // Results
        var coords = res.results[0].geometry.location;
        location = (coords.lat || coords.k) + ', ' + (coords.lng || coords.A);
    }
});

gpa.search({name: 'Big Slice, Toronto', location: location}, function(err, res) {
    if (!err) {
        console.log(res); // Results
        bigSlice = res.results[0];
        bigSlice.reference.should.be.ok;
    }
});

gpa.details({placeid: bigSlice.place_id}, function(err, res) {
    if (!err) {
        console.log(res); // Results
    }
});
```


Defaults
--------
These are the application defaults. You can overwrite them during instantiation
of the class or by passing them in the first argument of the search methods.

```
var defaults = {
    key: '',
    sensor: false,
    query: '',
    name: '',
    reference: '',
    radius: 5000, // Defaults to a 5K radius
    types: 'food', // Defaults to food establishments
    location: ('43.653226, -79.3831843'), // Defaults to Toronto
    searchUrl: 'https://maps.googleapis.com/maps/api/place/nearbysearch/json',
    detailsUrl: 'https://maps.googleapis.com/maps/api/place/details/json',
    textUrl: 'https://maps.googleapis.com/maps/api/place/textsearch/json'
}
```

Test
----
`npm test`


Issues
------
https://github.com/ramseydsilva/GooglePlacesClient/issues



[docs]: http://googleplacesapi.ramseydsilva.com

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