Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package_search: fails on older versions of CKAN (e.g. 2.2) with params not allowed #120

Closed
sckott opened this issue Jul 3, 2019 · 0 comments
Labels
Milestone

Comments

@sckott
Copy link
Contributor

sckott commented Jul 3, 2019

ckanr_setup("http://search.geothermaldata.org")
x <- package_search(q = '*:*', rows = 1)
#> Error: 400 - Search Query Error
#>   message Search Query is invalid: "Invalid search parameters: 
#>   ['use_default_schema', 'include_drafts', 'include_private']"

those params aren't in the package_search route in that CKAN version https://docs.ckan.org/en/ckan-2.2.3/api.html

probably need to

  • get CKAN installation version on user running ckanr_setup()
    • if they just pass a URL to a fxn call, then we need to call ckan_version() to get the version
  • then remove params not supported for diff. versions as needed
  • then do http request
@sckott sckott added the bug label Jul 3, 2019
@sckott sckott added this to the v0.2 milestone Jul 3, 2019
@sckott sckott closed this as completed in 69e7c4f Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant