Project

geoapi

0.01
No commit activity in last 3 years
No release in over 3 years
A Ruby wrapper for the GeoAPI.com API. See http://api.geoapi.com for more information about the API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.1.3
 Project Readme
= NOTE

This is still actively being developed and is very alpha.  You can currently conduct a simple search and an MQL query.  The results are returned as ruby hash.

== TODO

- Building data objects to represent Entities and Views.

- Allow updates to views.


= GeoAPI

A Ruby wrapper for the GeoAPI.com APIs.  This gem was almost entirely inspired by the various geoplanet gems.

== Usage

=== Reverse Geocoding:

  require 'geoapi'
  GeoAPI.apikey = [Your App ID Here]
  
  # Location
  latitude = -27.000
  longitude = -131.000
  
  # Non Required Options
  optional_parameters = {:radius => '500m', :type => 'POI', "include-parents" => true, :limit => 5, :pretty => true}
  
  # Simple Search
  result = GeoAPI::Query.simple_search(latitude, longitude, optional_parameters)

  # MQL Query
  q = {:lat => 37.75629, :lon => -122.4213, :radius => "1km", :entity => [{:type => "business", :guid => nil}]}
  results = GeoAPI::Query.query(q)
  


== REQUIREMENTS:

To use this library, you must have a valid GeoAPI.com API Key. 
You can get one at http://api.geoapi.com

Additionally, geoapi has the following gem dependencies:

* rest-client >= 0.9
* json >= 1.1.3

Please note that if you have ActiveSupport::JSON defined (either by
manually having loaded it or when you use geoapi within a Rails
application) the json dependency will be ignored and geoapi uses
ActiveSupport::JSON instead.

== INSTALL:

This gem is hosted on Gemcutter. To install gemcutter:
  gem install gemcutter
  gem tumble
  
To install geoapi after gemcutter:
  gem install geoapi