Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

goog-places-api

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

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

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 23 Sep 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc