0.0
No commit activity in last 3 years
No release in over 3 years
A ruby wrapper for the Coordsafe locator API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
~> 2.6

Runtime

 Project Readme

Coordsafe Api

Build Status Code Climate Coverage Status

Ruby wrapper for the Coordsafe locator API

Installation

Add to your Gemfile gem 'coordsafe_api'

Usage

Initialize your request. It takes company_name and key as parameters.

@api = CoordsafeApi::Locator.new({:company_name => "EdeyaLabs", :secret => "test-1234qwer"})

Use locate to get a list of all locators

request = @api.locate
results = request.body #=> Returns an Array of Hashes

Use locate_history with the locator_id and date_from to get the path of the locator at that particular date.

date_from = DateTime.parse("2013-01-27 9:30")
request   = @api.locate_history(18, date_from)
results   = request.body #=> Returns an Array of Hashes

Use locate_history with the locator_id, date_from and date_to to get the path of a locator within the dates.

date_from = DateTime.parse("2013-01-27 9:30")
date_to   = DateTime.parse("2013-01-27 10:00")
request = @api.locate_history(18, date_from, date_to)
results = request.body #=> Returns a Hash