Frage

Given the CKAN package at http://data.gov.au/api/3/action/package_show?id=national-public-toilet-map, it lists all the resources for the dataset.

Is there a way to query to find the most recent resource for that package?

I know I can just parse the results for the above query, but I'd prefer a more concise response if possible.

War es hilfreich?

Lösung

I think you may have to call package_show and then parse the result, as you've said you can. The most promising candidate that comes to mind for getting your answer directly from the API is resource_search with its order_by and limit params to get just the one most recently updated resource. But as far as I can see, it's not possible to restrict resource_search to only resources belonging to a particular package. That seems like a good use-case though, so I think a github issue or pull-request for this would be welcome.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top