GitXplorerGitXplorer
d

places-api-key-proxy

public
15 stars
8 forks
1 issues

Commits

List of commits on branch master.
Unverified
c4a0dfbafc6886f89ca32efb4ec2faf1d62e156f

Update README.md

ddomesticmouse committed 9 years ago
Unverified
fc3bb561e34fe0ad6171fd08a212027fe983e143

Linking Google Maps SDK for iOS

ddomesticmouse committed 9 years ago
Unverified
7b1f3883c0874b558226820b8042c7372bd53a01

Update README.md

ddomesticmouse committed 9 years ago
Unverified
566433b73a82f4357ba845b9706845f69adfa22f

Linking Ray Wenderlich tutorial

ddomesticmouse committed 9 years ago
Unverified
5a23284b7475f88dfa41022e4291f932c64ff5e7

An API Proxy for Places API

ddomesticmouse committed 9 years ago
Unverified
31d09826776ce7dedcadafdddcf15db8dce18f10

Initial commit

ddomesticmouse committed 9 years ago

README

The README file for this repository.

Places API Key proxy

A proxy for Google Places API that adds API key to requests. For a good tutorial on how to use this Places API Proxy with Google Maps SDK for iOS, please see Google Maps iOS SDK Tutorial: Getting Started published on RayWenderlich.com.

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