LocalHash is a basic example of location based webhooks using the geohash algorithm and is possibly a PubSubHubbub extension candidate. The API was implemented using Sinatra, Redis, Thin, and Nginx. The GitHub project includes tests and basic configuration examples.
Substitute #{name} with the name of the publisher you would like to subscribe
The API supports the following RESTful methods to receive publisher data.
Send an HTTP GET request to show a previously created Subscription
curl http://www.localhash.com/publishers/myspace/subscriptions/{id}
Response
Status Code 200 <?xml version="1.1" encoding="UTF-8"?><response><subscription hash="txn0ybs62v" callback="http://hostname" id="1"/></response>
Send an HTTP POST request to create a Subscription
curl -d "hub.callback=http://your.hostname.com&hub.lat=39.51&hub.lon=76.24"
http://www.localhash.com/publishers/myspace/subscriptions
Response
Status Code 201 <?xml version="1.1" encoding="UTF-8"?><response><subscription hash="txn0ybs62v" callback="http://hostname" id="1"/></response>
Send an HTTP DELETE request to remove a previously created Subscription
curl -X DELETE http://www.localhash.com/publishers/myspace/subscriptions/{id}
Response
Status Code 202 <?xml version="1.1" encoding="UTF-8"?><response></response>
Substitute #{name} with the name of the publisher you would like to subscribe
The API supports subscription based data streams.
curl -d "hub.lat=34.052&hub.lon=-118.243&hub.precision=3"
http://www.localhash.com/publishers/myspace/stream
All response codes are included in the HTTP Status response header. Possible status codes include:
Here's some background information on Activity Streams, pubsubhubbub, and Geohash
For those paying close attention, there's no security baked in...it's just a spike.