Esri's Geotrigger Service is replacing Geoloqi! Learn More | FAQ

Ruby Gem

To get you started quickly your personal access token is included in these examples. However you should use an application access token instead, which you can get from the applications page.

Log in to get your personal access token

Geoloqi provides you with everything you need to start building powerful location-based applications with the Ruby programming language!

This is the same one we use to power the Geoloqi website. It's written to be fast, highly configurable and thread safe.

Try it Quickly

Start by installing the Ruby gem, and creating a geotrigger:

$ gem install geoloqi
require "geoloqi"

geoloqi_session = Geoloqi::Session.new(
  :access_token => "YOUR APPLICATION ACCESS TOKEN"
)

result = geoloqi_session.post("trigger/create", {
  :key        => "powells_books",
  :type       => "message",
  :latitude   => 45.523334,
  :longitude  => -122.681612,
  :radius     => 150,
  :text       => "Welcome to Powell's Books!",
  :place_name => "Powell's Books"
})

# Returns this hash:

{
  :trigger_id    => "2sSW",
  :place_id      => "2Urq",
  :key           => "powells_books",
  :type          => "message",
  :trigger_on    => "enter",
  :trigger_after => 0,
  :one_time      => 0,
  :text          => "Welcome to Powell's Books!",
  :extra         => {},
  :place         => {
    :place_id     => "2Urq",
    :name         => "Powell's Books",
    :latitude     => 45.523334,
    :longitude    => -122.681612,
    :radius       => 150,
    :display_name => "Powell's Books",
    :active       => 1,
    :extra        => {},
    :description  => ""
  }
}

The source code is freely available on Github.

Documentation