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

Development

~> 0.71.0

Runtime

~> 1.0
~> 2.3
 Project Readme

TTTelematics

A simple ruby API Wrapper for TomTomTelematics

1. Quick start

Install via Rubygems

gem install tttelematics

... or add to Gemfile

gem 'tttelematics'

use in IRB

require 'tttelematics'

2. Initialize Client

client = TTTelematics::API::Client.new('apikey','username','account','password')

3. Get Objects

For more options Resources Objects TomTomTelematics.

3.1 showObjectReportExtern

More details

#format = ['json','csv']
#client.asset.objects(options, format)

client.asset({objectno: 'OBJECTID'}, 'json')
or 
asset = client.asset
objects = asset.objects({}, 'json')

asset = TTTelematics::API::Asset.new(client)
objects = asset({objectno: 'OBJECTID'}, 'json') #response a json

array_objects = JSON.parse(objects)

4. Errors

More details

# Common Errors

TTTelematics::Err::InvalidAPIKey -> API key is invalid
TTTelematics::Err::InvalidUser -> User does not exist
TTTelematics::Err::InvalidAction -> Action is not valid