Open Conal-Tuohy opened 10 months ago
Libraries Australia reference: RSref164975
If the change to the URL syntax is intended, then there's something that will need to be fixed (apart from the documentation): the API responses include next
attributes containing URLs which point to subsequent pages of results, and these URLs have facet
parameters whose values are comma-separated lists. i.e. you can start with a query URL like this, which does produce a response containing facets:
https://api.trove.nla.gov.au/v3/result?category=newspaper&facet=format&facet=decade
The response contains a next
value of:
https://api.trove.nla.gov.au/v3/result?category=newspaper&facet=format%2Cdecade&s=AoIIP4AAACkxMDAwMDAwNjQ%3D
NB the next
URL has a single facet
parameter containing a comma-separated list, and a response to that URL does not include facet data. That next
URL should be returned as:
https://api.trove.nla.gov.au/v3/result?category=newspaper&facet=format%2Cdecade&s=AoIIP4AAACkxMDAwMDAwNjQ%3D
Temporary workaround in fd9ac52
When querying the Trove API, if the value of the
facet
URL parameter is a comma-separated list of facet names, then facets are NOT returned in the response, e.g. https://api.trove.nla.gov.au/v3/result?category=newspaper&facet=format,decade The section on facets in the online documentation (the Controlling the metadata returned section) saysThis does work for other parameters, but not for
facet
.