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

GET publication info #21

Merged
merged 51 commits into from
Sep 18, 2024
Merged

GET publication info #21

merged 51 commits into from
Sep 18, 2024

Conversation

rmbielby
Copy link
Contributor

@rmbielby rmbielby commented Sep 11, 2024

Brief overview of changes

Dithered a little over the scope of this one, but settled on two things:

  • GET publication catalogue (i.e. show all the available publications and their info)
  • GET publications datasets (i.e. show all the available datasets for a single publication and their info)

Why are these changes being made?

The aim is to provide a basis for analysts to easily query the API publication list and range of datasets from within R.

Detailed description of changes

The core of this is those two processes, which are handled by the new functions:

  • get_publication_catalogue()
  • get_publication_datasets()

Alongside those I've built up eesapi_url() to handle those endpoints and to handle things like the Page and pageSize flags used in querying the API. That's also led on to building some more robust validation around things we're using to create API URLs, for which I've started a separate script: validation_rules.R.

Additional information for reviewers

I've been keeping everything exported for now as:
a) it's hard to say what end users will and won't find a use for themselves and
b) things break when I don't export things (aka I need to do some reading into how to use non-exported functions, which feels like a me-in-2-weeks-time thing to do).

Issue ticket number/s and link

#15

@rmbielby rmbielby requested a review from cjrace September 11, 2024 15:08
@rmbielby rmbielby self-assigned this Sep 11, 2024
@rmbielby rmbielby linked an issue Sep 11, 2024 that may be closed by this pull request
tests/testthat/seed_tests.R Fixed Show fixed Hide fixed
tests/testthat/seed_tests.R Fixed Show fixed Hide fixed
tests/testthat/seed_tests.R Fixed Show fixed Hide fixed
R/get_publication.R Fixed Show fixed Hide fixed
R/get_publication.R Fixed Show fixed Hide fixed
R/get_publication.R Fixed Show fixed Hide fixed
R/get_publication.R Fixed Show fixed Hide fixed
R/get_publication.R Fixed Show fixed Hide fixed
R/get_publication.R Fixed Show fixed Hide fixed
R/get_publication.R Fixed Show fixed Hide fixed
R/get_publication.R Fixed Show fixed Hide fixed
R/get_publication.R Fixed Show fixed Hide fixed
R/get_publication.R Fixed Show fixed Hide fixed
R/get_publication.R Fixed Show fixed Hide fixed
R/get_publication.R Fixed Show fixed Hide fixed
R/get_publication.R Fixed Show fixed Hide fixed
R/get_publication.R Fixed Show fixed Hide fixed
R/api_url.R Fixed Show fixed Hide fixed
R/api_url.R Fixed Show fixed Hide fixed
R/api_url.R Fixed Show fixed Hide fixed
R/api_url.R Fixed Show fixed Hide fixed
R/api_url.R Show resolved Hide resolved
R/api_url.R Outdated Show resolved Hide resolved
R/warning_max_pages.R Show resolved Hide resolved
_pkgdown.yml Show resolved Hide resolved
tests/testthat/seed_tests.R Show resolved Hide resolved
tests/testthat/test-helper_functions.R Outdated Show resolved Hide resolved
@rmbielby rmbielby requested a review from cjrace September 17, 2024 09:21
Copy link
Contributor

@cjrace cjrace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tiny thing on something I think you've missed in news.md, but approving as happy for you to push that up and then just merge in

NEWS.md Show resolved Hide resolved
@rmbielby rmbielby merged commit c370149 into main Sep 18, 2024
9 checks passed
@rmbielby rmbielby deleted the query-data-catalogue branch September 18, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create query to find datasets and associated ids
2 participants