Socket
Socket
Sign inDemoInstall

goog-places-api

Package Overview
Dependencies
8
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    goog-places-api

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


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
2.64 MB
Created
Weekly downloads
 

Readme

Source

goog-places-api

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

NPM version Build Status Dependency Status Coverage percentage experimental

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

FAQs

Last updated on 23 Sep 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc