Reputation: 17186
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.
Upvotes: 1
Views: 592
Reputation: 14640
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.
Upvotes: 2