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
CURL
Here are some quick examples of interacting directly with the API using curl. We've generated an access token for your account, so you can copy and paste these examples directly into your terminal.
Get Your Profile Info
$ curl -H "Authorization: OAuth Log in to get your personal access token" https://api.geoloqi.com/1/account/profile
Javascript
Similar to Facebook's connect-js, this library allows you to develop rich web applications using only javascript. There are no backend/server requirements - all you need to get started is a web browser and a text editor!
You can get it from our CDN!
<script type="text/javascript" src="https://api.geoloqi.com/js/geoloqi.min.js"></script>
Ruby
This is the same gem 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 trigger:
$ 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"
})
Documentation | Github | Ruby Gems
Node
Geoloqi has built an official Node.js client library for developers, which makes integration with Node.js projects easy.
Start by installing the module via NPM:
$ npm install geoloqi
PHP
Geoloqi has support for PHP via our Geoloqi SDK PHP library. It requires 5.2.0 or later for the embedded JSON, and the cURL bindings (which are compiled by default with most installations).
Getting started is easy. All you need is an Access Token, which you can get from the Geoloqi Developers Site:
<?php
include('Geoloqi.php');
$geoloqi = Geoloqi::createWithAccessToken('Log in to get your personal access token');
$response = $geoloqi->get('account/profile');
echo("Response for GET account/profile:<br>");
print_r($response);
echo("<br><br>Response for POST account/profile:<br>");
$response = $geoloqi->post('account/profile', array('website' => 'http://example.com'));
print_r($response);
?>
Python
Geoloqi has a basic Python wrapper that allows you to easily interact with the Geoloqi API.
If you'd like to help us build out the Python library please consider forking the project on GitHub.
Installing The Package
$ pip install geoloqi-python