Returns the latest chalks each from "right here", "this block", "within two blocks", and "in your neighborhood". Up to 100 results.
Note that the "neighborhood" field/attribute refers not to the neighborhood of a specific chalk but rather to the user's current neighborhood (as determined from the latitude and longitude passed in with the request). This data is not always available but is returned when it is known. In the XML response this it takes the form of a single attribute on the top-level "chalk" tag. In the JSON response it is a field that recurs with each individual chalk; despite this, the field should not be confused as being related to a specific. (This JSON format is admittedly a hack but it was done in order to allow providing this data without breaking backwards compatibility with the current API version. This will be improved in the next version of the API.)
URL:
http://blockchalk.com/api/v0.6/chalks?lat=latitude&long=longitude
If you also provide the optional URL parameter
user=userId the results will be filtered to omit any chalks that the given user has buried (see
POST /chalk/chalkId/bury).
If you provide the optional URL parameter
profanityFilter=true a profanity filter will be applied to the results.
HTTP method:
GET
Formats:
By default results are returned as XML. You can request JSON or RSS by adding the optional
&format=xml|json|rss parameter.
Response (success): HTTP 200
XML:
<chalks neighborhood="Inner Sunset">
<chalk>
<id>7b1ec33dc010</id>
<contents>Drinking at Gordon biersch</contents>
<datetime>2009-08-14 00:07:04 UTC</datetime>
<distance>right here</distance>
<coordinates lat="37.344" long="-121.888"/>
<place/>
<chalkbackTo>32a9f4ea86a2</chalkbackTo>
</chalk>
<chalk>
<id>36d9f2ea81a1</id>
<contents>I'm the froyo mayur</contents>
<datetime>2009-08-13 23:09:11 UTC</datetime>
<distance>within a few blocks</distance>
<coordinates lat="37.442" long="-122.159"/>
<place>123 Main St Anytown, CA</place>
<chalkbackTo/>
</chalk>
</chalks>
JSON:
[{"contents": "Drinking at Gordon biersch", "neighborhood":"Inner Sunset","id": "7b1ec33dc010", "datetime": "2009-08-14 00:07:04 UTC", "distance": "right here", "chalkbackTo":"32a9f4ea86a2", "coordinates":{"lat":"37.344","long":"-121.888"}}, {"contents": "I'm the froyo mayur", "neighborhood":"Inner Sunset", "id": "36d9f2ea81a1", "datetime": "2009-08-13 23:09:11 UTC", "distance": "within a few blocks", "coordinates": {"lat":"37.443","long":"-122.159"}, "place": "123 Main St Anytown, CA"}]
Response (failure): HTTP 400
XML:
<errors>
<error>no latitude</error>
<error>invalid longitude</error>
</errors>
JSON:
[{"error": "no latitude"}, {"error": "invalid longitude"}]