Compression & new LatLong search endpoint (includes JSONP)

8 views
Skip to first unread message

barryhunter

unread,
Mar 25, 2010, 5:24:43 AM3/25/10
to Geograph-API-Users
The 'syndicator.php' has just been improved, to take advantage of
memcache which should mean better response times for most requests. :)

But adding this was also an ideal time to add GZIP support. So if you
(or the client library used) supply a Accept-Encoding: gzip header you
should get a gziped reply.


Also a new REST API, for searching by latitude/longitude:

http://api.geograph.org.uk/api/Latlong/2km/50.64163,-1.94978/apikey

Interestingly now supports a JSON output, and "JSON with callback"/
JSONP:

http://api.geograph.org.uk/api/Latlong/2km/50.64163,-1.94978/?output=json&callback=geographImages

As this works in from JavaScript in a webpage, please don't include an
API key in such cases, - we have the http-referrer for tracking
purposes.

The radius only understands KM currently, and should be 10km or
below.


Will shortly document this, subject to successful testing.

Barry
Geograph

barryhunter

unread,
Mar 26, 2010, 6:05:03 PM3/26/10
to Geograph-API-Users
Just updated the documentation to more formally document this and
other recent changes:
http://www.geograph.org.uk/help/api

ChangeLog
~~~~~~~

* New recommended domain for most API calls: api.geograph.org.uk (of
course still works on www.)

* New 'distance' param for syndicator.php to choose an explicit
distance limit (works best under 10km)

* New 'perpage' param for syndicator.php to choose number of results
per page (max 100)

* New JSON (and JSONP) output for REST API (as includes callback can
be used in webpages)

* New latlong method for REST API to searching nearby (same
functionality as syndicator, but useful to get JSON output)

* New columns for moderation status and points status to CSV output.

Reply all
Reply to author
Forward
0 new messages