Escolar Documentos
Profissional Documentos
Cultura Documentos
API Documentation g
A riment
expe Labs
from HP
hpgloe.com
In this document we describe the General Protocol
API for the HP Gloe service, a All APIs support JSONP, that is a callback HTTP GET parameter may be passed and the
result is then the string:
geo-tagging experiment from HP
Labs. The goal of this document is callback(json data);
to promote mashup services and
All operations may be called using HTTP GET with the format:
customized clients to be written
on top of Gloe and to allow http://www.hpgloe.com/json/operation/?param1=val1¶m2=val2…
syndication of Gloe content.
The API also allows native clients Authentication
to be built for platforms that Gloe Most operations can be called without requiring authentication. There are two ways
of authenticating a user, with Facebook Connect, and with the native Gloe
currently does not support, such authentication protocol.
as a Firefox extension or iPhone
app. For a general description of To initiate a Facebook Connect login a browser should be opened with the URL:
getrec lat – latitude (required) Return recommendations JSON array of 10-tuple with If filter is not all
based on a geolocation and elements [<rank>,<url>, authentication is required.
lon – longitude (required) various filters. Defaults are <title>,<thumburl>,
radius: 10 miles and hits: <sample>,<tags>,<latitude>,
radius – search radius
10 recommendations and <longitude>, <clicks>,
hits – # result items no filters. <distance>] thumburl, sample
and tags are all deprecated,
tag – channel name latitude and longitude are
averages. All text is in
filter – me, all, friends unicode compatible URL
encoding.
ref – url reference (used
by notes attached to Web
pages)
rec lat – latitude (required) Recommend and geotag JSON object with If the url parameter is used it
Web sites or comments/ attribute message set to is a regular recommendation
lon – longitude (required) notes on Web sites. RECOMMENDATION_ for an existing site. If the
RECORDED if all went well notes parameter is used the
url – url to recommend
and attribute quote set to url of the recommendation
(required)
the remaining quota. will be created dynamically
tags – channel to and hosted on the gloe
recommend on server. If click=true the
recommendation does
ref – url that this not count towards to
recommendation is in recommendation quota and
reference to it is not taken into account
when ranking Web sites.
notes – used instead of url to
create notes
title – title of
recommendation
click – true/false
register nickname – requested gloe Registers a new gloe JSON object with message An email will be sent to
user name (required) account. attribute set to REGISTRATION_ the provided address if
SUCCESS or error attribute registration succeeded.
email – email address of set to DUPLICATE_NAME_ The email will contain an
account (required) OR_EMAIL if nickname or activation link and a user
email already exists (should be id. The activation link must
done over https to obtain the be opened in a browser to
recommendation key on the activate the account. The
wire in the key attribute). nickname and the user id
must be used to sign requests
that require authentication.
friends action – remove/add (required) Adds or removes friends to JSON object with attribute Requires authentication.
filter on to a gloe account. message set to FRIENDS_
friends – space separated list UPDATED and friends set to new
of friends (space separated) list of friends
if all went well.
getrectag lat – latitude (required) Returns most popular tags in JSON array of 2-tuple with
a geolocation. elements [<rank>,<tag>].
lon – longitude (required)
info friends – true/false, return Returns current quota and JSON object with attribute Authentication required.
friends or not friends of an authenticated quota set to remaining quota
user. and attribute friends set to
current friends.
top lat – latitude (required) Get top contributors in a JSON object {“top”: [[“<id1>”, Names attribute provides
geolocation. <recs1>],...], “names”: human readable names for
lon – longitude (required) {“<userid1>”: {“LastName”: user ids if available.
“<last name 1>”, “FirstName”:
“<first name 1>”}...}}}
Example USE