Go package for the Who's On First "standard places responses" (SPR) interface.
The StandardPlacesResult
(SPR) interface defines the minimum set of methods that a system working with a collection of Who's On First (WOF) must implement for any given record. Not all records are the same so the SPR interface is meant to serve as a baseline for common data that describes every record.
The StandardPlacesResults
takes the Flickr standard photo response as its inspiration which was designed to be the minimum amount of information about a Flickr photo necessary to display that photo with proper attribution and a link back to the photo page itself. The StandardPlacesResults
aims to achieve the same thing for WOF records.
Being a Go language interface type the SPR is not designed as a data exchange method. Any given implementation of the SPR may allow its internal data to be exported or serialized (for example, as JSON) but this is not a requirement.
For a concrete example of a package that implements the SPR
have a look at the go-whosonfirst-sqlite-spr package.
-
The
Id()
andParentId()
methods returnstring
(rather thanint64
) values to account for non-WOF GeoJSON documents that are consumed by thewhosonfirst/go-whosonfirst-geojson-v2
package. -
Flags are defined in the go-whosonfirst-flags package.
-
The
Path()
method is expected to return a relative URI. TheURI
method is expected to return a fully-qualified URI. These two methods are confusing and that confusion should be addressed.