Skip to content

phuphighter/google_places_autocomplete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Places Autocomplete

Ruby wrapper for the Google Places Autocomplete API.

Installation

Inside your Gemfile:
gem 'google_places_autocomplete'

Get Google Places API credentials

Go here and activate it:
https://code.google.com/apis/console

Usage

Instantiate a client

>> client = GooglePlacesAutocomplete::Client.new(:api_key => 'your_api_key')

Example

>> autocomplete = client.autocomplete(:input => "Paris", :types => "geocode")
>> autocomplete.predictions.first.description
=> "Paris, France"

Contact me if you have any suggestions and feel free to fork it!

About

Ruby wrapper for the Google Places Autocomplete API

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages