-
Notifications
You must be signed in to change notification settings - Fork 569
Ruby example (redis rb)
Josh Baker edited this page Jan 2, 2017
·
3 revisions
gem install redis
Since tile38 is using the redis commands but not the redis semantics it is advised to use the generic call
method to send commands to the tile38 server.
require 'redis'
redis = Redis.new(host: 'localhost', port: 9851)
redis.call(:set, 'fleet', 'truck1', 'POINT', '33', '-115')
# => 'OK'
redis.call(:get, 'fleet', 'truck1')
# => '{"type":"Point","coordinates":[-115,33]}'
Thanks to Jonatan Reiners for providing this example code