# goog-places-api

> Modern library for Google Places https://developers.google.com/places/?hl=ru

Latest version **0.0.3** (published 2017-09-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install goog-places-api
pnpm add goog-places-api
yarn add goog-places-api
bun add goog-places-api
```

## Health

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

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

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2017-09-23 |
| First published | 2017-09-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | arvitaly |

## Links

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

## Dependencies (2)

- [node-fetch](https://npm.io/package/node-fetch.md) ^1.7.3
- [@types/node-fetch](https://npm.io/package/@types/node-fetch.md) ^1.6.7

## Recent versions

- 0.0.3 (latest) — 2017-09-23
- 0.0.2 — 2017-09-23
- 0.0.1 — 2017-09-23

## README

# goog-places-api

Modern library for Google Places https://developers.google.com/places/?hl=ru

[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]
[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)

# Install

    npm install goog-places-api --save

    or

    yarn add goog-places-api

# Usage

    import Api from "goog-places-api";

    const api = Api("key1");

    // Iterator for all places in area

    for await (const loc of api.nearby("55.7494733,37.3523209", 50000, {
        keyword: "restaurant",
    })) {

        // Get detail for current place

        const location = await api.details(loc.place_id);

        console.log(location.name);

        // Get first photo to buffer

        const buf = await api.photo(location.photos[0].photo_reference);

        // Write photo to file

        require("fs").writeFileSync(__dirname + "/1.jpg", buf);

        break;
    }

# Test

    npm install
    npm test

[npm-image]: https://badge.fury.io/js/goog-places-api.svg
[npm-url]: https://npmjs.org/package/goog-places-api
[travis-image]: https://travis-ci.org/arvitaly/goog-places-api.svg?branch=master
[travis-url]: https://travis-ci.org/arvitaly/goog-places-api
[daviddm-image]: https://david-dm.org/arvitaly/goog-places-api.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/arvitaly/goog-places-api
[coveralls-image]: https://coveralls.io/repos/arvitaly/goog-places-api/badge.svg
[coveralls-url]: https://coveralls.io/r/arvitaly/goog-places-api

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