Giter VIP home page Giter VIP logo

places-api-key-proxy's Introduction

Places API Key proxy

A proxy for Google Places API that adds API key to requests.

Usage

Firstly, install the Dart SDK. The recommended way is to use Homebrew to install Dart.

$ brew tap dart-lang/dart
$ brew install dart

Then download the dependent packages using Dart's pub package management tool.

$ cd places-api-key-proxy
$ pub install

Finally, run the Places API Key proxy server by supplying an API Key and a port to bind to.

$ pub run bin/main.dart -k AIzaNotARealAPIKey -p 10000
2015.29.30 10:29:35.159	places_api_key_proxy	[INFO]:	Places API proxy running on localhost:10000

To test the Proxy server, simply open localhost:10000/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=cruise in your browser of choice.

$ curl "http://localhost:10000/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=cruise" | more

This proxy server binds to all interfaces on the machine, so it will be visible on localhost for use from the iOS Simulator, and via en0 for use from a real iOS device, provided both your Mac and your iOS device share the same Wifi. To retrieve the IP address of your machine, use ifconfig as follows.

$ ifconfig en0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 28:cf:e9:12:8d:35
	inet6 fe80::2acf:e9ff:fe12:8d35%en0 prefixlen 64 scopeid 0x4
	inet 192.168.1.10 netmask 0xffffff00 broadcast 192.168.1.255
	nd6 options=1<PERFORMNUD>
	media: autoselect
	status: active

This is not an official Google product

places-api-key-proxy's People

Contributors

domesticmouse avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.