Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Commit

Permalink
Search docs for idref= and format=nlgeojson, refs #367
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Apr 22, 2021
1 parent f4582bf commit dcf0e2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ Optional query string parameters:

- `q=` - a term to search for in the `name` field
- `size=` - the number of results to return, up to 1000
- `output=` - the output format, see below.
- `format=` - the output format, see below.
- `state=` - a state code such as `CA` or `OR`
- `idref=` - one or more concordance identifiers, e.g. `google_places:ChIJsb3xzpJNg4ARVC7_9DDwJnU` - will return results that match any of those identifiers

The following output formats are supported:

- `json` - the default. [Example JSON](https://vial-staging.calltheshots.us/api/searchLocations?q=walgreens&format=json)
- `geojson` - a GeoJSON Feature Collection. [Example GeoJSON](https://vial-staging.calltheshots.us/api/searchLocations?q=walgreens&format=geojson)
- `nlgeojson` - Newline-delimited GeoJSON. [Example nl-GeoJSON](https://vial-staging.calltheshots.us/api/searchLocations?q=walgreens&format=nlgeojson)
- `map` - a basic Leaflet map that renders that GeoJSON. [Example map](https://vial-staging.calltheshots.us/api/searchLocations?q=walgreens&format=map)

You can also add `debug=1` to the JSON output to wrap them in an HTML page. This is primarily useful in development as it enables the Django Debug Toolbar for those results.
Expand Down

0 comments on commit dcf0e2b

Please sign in to comment.