diff --git a/404.html b/404.html index 3366a84..3039735 100644 --- a/404.html +++ b/404.html @@ -31,7 +31,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/CODE_OF_CONDUCT.html b/CODE_OF_CONDUCT.html index 87bb109..df730a2 100644 --- a/CODE_OF_CONDUCT.html +++ b/CODE_OF_CONDUCT.html @@ -10,7 +10,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/CONTRIBUTING.html b/CONTRIBUTING.html index 99e13b2..0f77580 100644 --- a/CONTRIBUTING.html +++ b/CONTRIBUTING.html @@ -10,7 +10,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/LICENSE-text.html b/LICENSE-text.html index 56f33db..3894077 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -10,7 +10,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/LICENSE.html b/LICENSE.html index 3a6a9d6..0a0e0da 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -10,7 +10,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/SUPPORT.html b/SUPPORT.html index 69d5680..bc27831 100644 --- a/SUPPORT.html +++ b/SUPPORT.html @@ -10,7 +10,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/apple-touch-icon-120x120.png b/apple-touch-icon-120x120.png index 099c0ce..494df47 100644 Binary files a/apple-touch-icon-120x120.png and b/apple-touch-icon-120x120.png differ diff --git a/apple-touch-icon-152x152.png b/apple-touch-icon-152x152.png index c843683..31b7790 100644 Binary files a/apple-touch-icon-152x152.png and b/apple-touch-icon-152x152.png differ diff --git a/apple-touch-icon-180x180.png b/apple-touch-icon-180x180.png index 96c27d4..8d0291e 100644 Binary files a/apple-touch-icon-180x180.png and b/apple-touch-icon-180x180.png differ diff --git a/apple-touch-icon-60x60.png b/apple-touch-icon-60x60.png index 01f3fee..ee918b6 100644 Binary files a/apple-touch-icon-60x60.png and b/apple-touch-icon-60x60.png differ diff --git a/apple-touch-icon-76x76.png b/apple-touch-icon-76x76.png index 88395c7..d63e48e 100644 Binary files a/apple-touch-icon-76x76.png and b/apple-touch-icon-76x76.png differ diff --git a/apple-touch-icon.png b/apple-touch-icon.png index 6f818f3..90aabfe 100644 Binary files a/apple-touch-icon.png and b/apple-touch-icon.png differ diff --git a/articles/beekeeper.html b/articles/beekeeper.html index 680e14a..ef2390d 100644 --- a/articles/beekeeper.html +++ b/articles/beekeeper.html @@ -33,7 +33,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/articles/index.html b/articles/index.html index a9678ed..15bb495 100644 --- a/articles/index.html +++ b/articles/index.html @@ -10,7 +10,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/articles/pagination.html b/articles/pagination.html index 5ac629d..d454387 100644 --- a/articles/pagination.html +++ b/articles/pagination.html @@ -33,7 +33,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/authors.html b/authors.html index 3938ad7..39a0d25 100644 --- a/authors.html +++ b/authors.html @@ -10,7 +10,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 @@ -68,13 +68,13 @@ Citation Harmon J (2024). beekeeper: Rapidly Scaffold API Client Packages. -R package version 0.4.0, https://github.com/jonthegeek/beekeeper, https://beekeeper.api2r.org. +R package version 0.4.0.9000, https://github.com/jonthegeek/beekeeper, https://beekeeper.api2r.org. @Manual{, title = {beekeeper: Rapidly Scaffold API Client Packages}, author = {Jon Harmon}, year = {2024}, - note = {R package version 0.4.0, https://github.com/jonthegeek/beekeeper}, + note = {R package version 0.4.0.9000, https://github.com/jonthegeek/beekeeper}, url = {https://beekeeper.api2r.org}, } diff --git a/favicon-16x16.png b/favicon-16x16.png index b9b69c9..abf7719 100644 Binary files a/favicon-16x16.png and b/favicon-16x16.png differ diff --git a/favicon-32x32.png b/favicon-32x32.png index 5f046e8..a0a3119 100644 Binary files a/favicon-32x32.png and b/favicon-32x32.png differ diff --git a/index.html b/index.html index e821e91..f81c334 100644 --- a/index.html +++ b/index.html @@ -33,7 +33,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 @@ -147,12 +147,11 @@ The Plan -0.5.0: More robust scaffolding. - -Add parameter documentation. -Also add parameter type checking. - -Potential challenges: By this point I’ll need an OAS definition document to use for testing that includes all of the possible parameter types. I’ll likely need to generate a fake API specification that goes beyond a typical individual example. +0.5.0: More robust scaffolding. + +Add parameter documentation. +Also add parameter type checking. +Potential challenges: By this point I’ll need an OAS definition document to use for testing that includes all of the possible parameter types. I’ll likely need to generate a fake API specification that goes beyond a typical individual example. diff --git a/pkgdown.yml b/pkgdown.yml index 704bd6f..6d81694 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -4,7 +4,7 @@ pkgdown_sha: ~ articles: beekeeper: beekeeper.html pagination: pagination.html -last_built: 2024-04-26T19:27Z +last_built: 2024-04-26T20:21Z urls: reference: https://beekeeper.api2r.org/reference article: https://beekeeper.api2r.org/articles diff --git a/reference/as_bk_data.html b/reference/as_bk_data.html index 01916f6..5cfa01a 100644 --- a/reference/as_bk_data.html +++ b/reference/as_bk_data.html @@ -10,7 +10,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/reference/beekeeper-package.html b/reference/beekeeper-package.html index bc1b2dc..5d07161 100644 --- a/reference/beekeeper-package.html +++ b/reference/beekeeper-package.html @@ -10,7 +10,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/reference/dot-assert_is_pkg.html b/reference/dot-assert_is_pkg.html index 0c4cd37..fe4f5ec 100644 --- a/reference/dot-assert_is_pkg.html +++ b/reference/dot-assert_is_pkg.html @@ -10,7 +10,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/reference/dot-bk_use_template.html b/reference/dot-bk_use_template.html index 3c15691..dc3ddab 100644 --- a/reference/dot-bk_use_template.html +++ b/reference/dot-bk_use_template.html @@ -10,7 +10,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/reference/dot-is_pkg.html b/reference/dot-is_pkg.html index ac6f469..925f776 100644 --- a/reference/dot-is_pkg.html +++ b/reference/dot-is_pkg.html @@ -10,7 +10,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/reference/generate_pkg.html b/reference/generate_pkg.html index 83ab5b9..5498b48 100644 --- a/reference/generate_pkg.html +++ b/reference/generate_pkg.html @@ -14,7 +14,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/reference/generate_pkg_agent.html b/reference/generate_pkg_agent.html index 809d9f1..a75bddb 100644 --- a/reference/generate_pkg_agent.html +++ b/reference/generate_pkg_agent.html @@ -10,7 +10,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/reference/index.html b/reference/index.html index 911b992..9174b89 100644 --- a/reference/index.html +++ b/reference/index.html @@ -10,7 +10,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/reference/use_beekeeper.html b/reference/use_beekeeper.html index 175857b..92609f5 100644 --- a/reference/use_beekeeper.html +++ b/reference/use_beekeeper.html @@ -14,7 +14,7 @@ beekeeper - 0.4.0 + 0.4.0.9000 diff --git a/search.json b/search.json index 58c48fd..d8ce0a5 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement jonthegeek@gmail.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://beekeeper.api2r.org/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to beekeeper","title":"Contributing to beekeeper","text":"outlines propose change beekeeper.","code":""},{"path":"https://beekeeper.api2r.org/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to beekeeper","text":"can fix typos, spelling mistakes, grammatical errors documentation directly using GitHub web interface, long changes made source file. generally means ’ll need edit roxygen2 comments .R, .Rd file. can find .R file generates .Rd reading comment first line.","code":""},{"path":"https://beekeeper.api2r.org/CONTRIBUTING.html","id":"bigger-changes","dir":"","previous_headings":"","what":"Bigger changes","title":"Contributing to beekeeper","text":"want make bigger change, ’s good idea first file issue make sure someone team agrees ’s needed. ’ve found bug, please file issue illustrates bug minimal reprex (also help write unit test, needed).","code":""},{"path":"https://beekeeper.api2r.org/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"Bigger changes","what":"Pull request process","title":"Contributing to beekeeper","text":"Fork package clone onto computer. haven’t done , recommend using usethis::create_from_github(\"jonthegeek/beekeeper\", fork = TRUE). Install development dependencies devtools::install_dev_deps(), make sure package passes R CMD check running devtools::check(). R CMD check doesn’t pass cleanly, ’s good idea ask help continuing. Create Git branch pull request (PR). recommend using usethis::pr_init(\"brief-description--change\"). Make changes, commit git, create PR running usethis::pr_push(), following prompts browser. title PR briefly describe change. body PR contain Fixes #issue-number. user-facing changes, add bullet top NEWS.md (.e. just first header). Follow style described https://style.tidyverse.org/news.html.","code":""},{"path":"https://beekeeper.api2r.org/CONTRIBUTING.html","id":"code-style","dir":"","previous_headings":"Bigger changes","what":"Code style","title":"Contributing to beekeeper","text":"New code follow tidyverse style guide. can use styler package apply styles, please don’t restyle code nothing PR. use roxygen2, Markdown syntax, documentation. use testthat unit tests. Contributions test cases included easier accept.","code":""},{"path":"https://beekeeper.api2r.org/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to beekeeper","text":"Please note beekeeper project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://beekeeper.api2r.org/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 beekeeper authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://beekeeper.api2r.org/SUPPORT.html","id":null,"dir":"","previous_headings":"","what":"Getting help with beekeeper","title":"Getting help with beekeeper","text":"Thanks using beekeeper! filing issue, places explore pieces put together make process smooth possible.","code":""},{"path":"https://beekeeper.api2r.org/SUPPORT.html","id":"make-a-reprex","dir":"","previous_headings":"","what":"Make a reprex","title":"Getting help with beekeeper","text":"Start making minimal reproducible example using reprex package. haven’t heard used reprex , ’re treat! Seriously, reprex make R-question-asking endeavors easier (pretty insane ROI five ten minutes ’ll take learn ’s ). additional reprex pointers, check Get help! section tidyverse site.","code":""},{"path":"https://beekeeper.api2r.org/SUPPORT.html","id":"where-to-ask","dir":"","previous_headings":"","what":"Where to ask?","title":"Getting help with beekeeper","text":"Armed reprex, next step figure ask. ’s question: ’s best ask R4DS Online Learning Community Slack. options include Posit Community, StackOverflow. people answer questions. ’s bug: ’re right place, file issue. ’re sure: let community help figure ! problem bug feature request, can easily return report . opening new issue, sure search issues pull requests make sure bug hasn’t reported /already fixed development version. default, search pre-populated :issue :open. can edit qualifiers (e.g. :pr, :closed) needed. example, ’d simply remove :open search issues repo, open closed.","code":""},{"path":"https://beekeeper.api2r.org/SUPPORT.html","id":"what-happens-next","dir":"","previous_headings":"","what":"What happens next?","title":"Getting help with beekeeper","text":"’ll try look issue soon can, packages maintained volunteers. good reprex particularly important might weeks months initial report start working . can’t reproduce bug, can’t fix !","code":""},{"path":"https://beekeeper.api2r.org/articles/beekeeper.html","id":"step-0-create-your-package","dir":"Articles","previous_headings":"","what":"Step 0: Create your package","title":"Building an API Package","text":"start, first create package. recommend start usethis::create_package() streamline general package-creation steps. can get basic API calls working package two-step process.","code":""},{"path":"https://beekeeper.api2r.org/articles/beekeeper.html","id":"step-1-configure-your-package","dir":"Articles","previous_headings":"","what":"Step 1: Configure your package","title":"Building an API Package","text":"target API follows OAS, can use API’s OpenAPI Document configure package.","code":"# Note: Running these commands will create or overwrite \"_beekeeper.yml\" in your # working directory. url(\"https://api.apis.guru/v2/openapi.yaml\") |> use_beekeeper( api_abbr = \"guru\" ) # Or for the FEC API url(\"https://api.apis.guru/v2/specs/fec.gov/1.0/openapi.yaml\") |> use_beekeeper( api_abbr = \"fec\" )"},{"path":"https://beekeeper.api2r.org/articles/beekeeper.html","id":"step-2-generate-your-package-skeleton","dir":"Articles","previous_headings":"","what":"Step 2: Generate your package skeleton","title":"Building an API Package","text":"valid _beekeeper.yml file, can generate rest package. Right now package export function call API, eventually process also generate functions endpoints specified API’s OpenAPI document. generate_pkg() creates files defining package R directory, tests tests/testthat directory.","code":"# Note: Running this command will create or overwrite files in your R and # tests/testthat directories. generate_pkg()"},{"path":[]},{"path":"https://beekeeper.api2r.org/articles/beekeeper.html","id":"call-r","dir":"Articles","previous_headings":"The generated package","what":"010-call.R","title":"Building an API Package","text":"first file generated package R/010-call.R. file defines function can used call API. Notice function includes API-key authentication arguments appropriate!","code":"# Set up the basic call once at package build. fec_req_base <- nectar::req_setup( \"https://api.open.fec.gov/v1\", user_agent = \"fecapi (https://github.com/jonthegeek/fecapi)\" ) #' Call the OpenFEC API #' #' Generate a request to an OpenFEC endpoint. #' #' @inheritParams nectar::req_modify #' @param api_key An API key provided by the API provider. This key is not #' clearly documented in the API description. Check the API documentation for #' details. #' #' @return The response from the endpoint. #' @export fec_call_api <- function(path, query = NULL, body = NULL, method = NULL, api_key = Sys.getenv(\"FEC_API_KEY\")) { req <- nectar::req_modify( fec_req_base, path = path, query = query, body = body, method = method ) req <- .fec_req_auth(req, api_key = api_key) resp <- nectar::req_perform_opinionated(req) nectar::resp_parse(resp, response_parser = .fec_response_parser) }"},{"path":"https://beekeeper.api2r.org/articles/beekeeper.html","id":"auth-r","dir":"Articles","previous_headings":"The generated package","what":"020-auth.R","title":"Building an API Package","text":"Security API defined R/020-auth.R. initial version file works, may want edit automatic output. case OpenFEC API, description specifies three security schemes overlap one another: one sets X-Api-Key field header, two set api_key query string. names generated functions based names security schemes OpenAPI document. real package, deleted two query functions, since header function sufficient slightly secure. also renamed header function .fec_req_auth_api_key_header_auth .fec_req_auth_api_key_header remove redundant _auth.","code":"# These functions were generated by the {beekeeper} package, based on # components@security_schemes from the source API description. You may want to # delete unused options. In addition, APIs often have additional security # options that are not formally documented in the API description. For example, # for any `location = query` `api_key` options, it might be possible to instead # pass the same parameter in a header, possibly with a different name. Consult # the text description of authentication in your API documentation. .fec_req_auth <- function(req, api_key = NULL) { if (!is.null(api_key)) { req <- .fec_req_auth_api_key_header_auth(req, api_key) req <- .fec_req_auth_api_key_query_auth(req, api_key) req <- .fec_req_auth_api_key(req, api_key) } return(req) } # An API key provided by the API provider. This key is not clearly documented in # the API description. Check the API documentation for details. .fec_req_auth_api_key_header_auth <- function(req, api_key) { nectar::req_auth_api_key( req, location = \"header\", parameter_name = \"X-Api-Key\", api_key = api_key ) } # An API key provided by the API provider. This key is not clearly documented in # the API description. Check the API documentation for details. .fec_req_auth_api_key_query_auth <- function(req, api_key) { nectar::req_auth_api_key( req, location = \"query\", parameter_name = \"api_key\", api_key = api_key ) } # An API key provided by the API provider. This key is not clearly documented in # the API description. Check the API documentation for details. .fec_req_auth_api_key <- function(req, api_key) { nectar::req_auth_api_key( req, location = \"query\", parameter_name = \"api_key\", api_key = api_key ) }"},{"path":"https://beekeeper.api2r.org/articles/beekeeper.html","id":"test-files","dir":"Articles","previous_headings":"The generated package","what":"test files","title":"Building an API Package","text":"generated package also includes tests API. already done , also activates use testthat package. test overall functionality package, provide endpoint path tests/testthat/test-010-call.R. future version beekeeper attempt auto-fill path . Manually edited : may also want add specific tests endpoints require authentication vs endpoints require authentication. future version beekeeper attempt auto-generate tests appropriate (different paths use different security schemes).","code":"httptest2::with_mock_dir(\"api/01-call/valid\", { test_that(\"Can call an endpoint without errors\", { # A path will be auto-filled in a future version of beekeeper. fail( \"Provide any path for this API in PROVIDED_PATH, then delete this fail.\" ) PROVIDED_PATH <- \"path/to/endpoint\" expect_no_error(fec_call_api(PROVIDED_PATH)) }) }) httptest2::with_mock_dir(\"api/01-call/valid\", { test_that(\"Can call an endpoint without errors\", { PROVIDED_PATH <- \"candidates\" expect_no_error(fec_call_api(PROVIDED_PATH)) }) })"},{"path":"https://beekeeper.api2r.org/articles/pagination.html","id":"finding-pagination-information","dir":"Articles","previous_headings":"","what":"Finding pagination information","title":"Pagination","text":"can implement pagination package, need find API implements pagination. can usually find information API documentation. Sometimes information separate “Pagination” section top documentation. Often described individual endpoint documentation (even separately described section). isn’t clearly described, watch pagination-related endpoint parameters, page, pageSize, perPage limit, offset, cursor. tips finding pagination information, see can get lot data API? Web APIs R.","code":""},{"path":"https://beekeeper.api2r.org/articles/pagination.html","id":"implementing-pagination","dir":"Articles","previous_headings":"","what":"Implementing pagination","title":"Pagination","text":"req_perform_iterative() function {httr2} helps implement pagination. uses request helper functions create new request fetch next page. family functions experimental, sure check latest documentation case functions changed. implement pagination package, need edit 010-call.R file generated {beekeeper}. default, perform step handled nectar::req_perform_opinionated() function calls httr2::req_perform() give req object, httr2::req_perform_iterative() supply iteration helper function next_req parameter. example, every endpoint API uses page parameter paginate, replace line something like : default, nectar::req_perform_opinionated() returns 2 responses (max_reqs = 2). verified pagination strategy works, likely want increase limit, usually Inf. nectar::req_perform_opinionated() also implements basic httr2::req_retry() try request 3 times, using default httr2::retry_retry() settings decide failure transient.","code":"resp <- nectar::req_perform_opinionated(req) is_complete <- function(resp) { as.logical(length(httr2::resp_body_json(resp)$data)) } resp <- nectar::req_perform_opinionated( req, next_req = httr2::iterate_with_offset(\"page\", resp_complete = is_complete) )"},{"path":"https://beekeeper.api2r.org/articles/pagination.html","id":"more-complicated-pagination","dir":"Articles","previous_headings":"","what":"More complicated pagination","title":"Pagination","text":"like implement complex pagination, apply transformations req object httr2::req_retry() httr2::req_throttle(), can create perform function. name functions {api_abbr}_req_perform(). example, perform function {fecapi} package: Within 010-call.R, apply function like :","code":".fec_req_perform <- function(req, pagination, per_page, max_results, max_reqs, call) { next_req <- .choose_pagination_fn(pagination, call = call) max_reqs <- min(max_reqs, ceiling(max_results / per_page)) nectar::req_perform_opinionated( req, next_req = next_req, max_reqs = max_reqs ) } .choose_pagination_fn <- function(pagination, call = rlang::caller_env()) { pagination <- .validate_pagination(pagination, call) switch(pagination, basic = .iterator_fn_basic(), none = NULL ) } .validate_pagination <- function(pagination, call = rlang::caller_env()) { rlang::arg_match0( pagination, c(\"none\", \"basic\"), error_call = call ) } .iterator_fn_basic <- function() { httr2::iterate_with_offset( \"page\", resp_pages = function(resp) { httr2::resp_body_json(resp)$pagination$pages } ) } resp <- .fec_req_perform( req, pagination = pagination, per_page = query$per_page, max_results = max_results, max_reqs = max_reqs )"},{"path":"https://beekeeper.api2r.org/articles/pagination.html","id":"help-us-improve","dir":"Articles","previous_headings":"","what":"Help us improve","title":"Pagination","text":"find pattern pagination implementation API description /endpoint function parameters, please submit issue pull request help us improve output package.","code":""},{"path":"https://beekeeper.api2r.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Jon Harmon. Author, maintainer, copyright holder. R Consortium. Funder.","code":""},{"path":"https://beekeeper.api2r.org/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Harmon J (2024). beekeeper: Rapidly Scaffold API Client Packages. R package version 0.4.0, https://github.com/jonthegeek/beekeeper, https://beekeeper.api2r.org.","code":"@Manual{, title = {beekeeper: Rapidly Scaffold API Client Packages}, author = {Jon Harmon}, year = {2024}, note = {R package version 0.4.0, https://github.com/jonthegeek/beekeeper}, url = {https://beekeeper.api2r.org}, }"},{"path":"https://beekeeper.api2r.org/index.html","id":"beekeeper-","dir":"","previous_headings":"","what":"Rapidly Scaffold API Client Packages","title":"Rapidly Scaffold API Client Packages","text":"Use beekeeper create maintain R packages wrap APIs. generated packages follow best practices, including documentation testing. package focuses APIs follow OpenAPI Specification (OAS). Currently versions 3.0 3.1 supported, support swagger 2.0 come. APIs must API document yaml format. package skeletons generated beekeeper implement best practices streamline package development.","code":""},{"path":"https://beekeeper.api2r.org/index.html","id":"the-plan","dir":"","previous_headings":"","what":"The Plan","title":"Rapidly Scaffold API Client Packages","text":"project accepted R Consortium 2023 ISC Grant Program! rough outline planned development milestones package, working toward stable version 1.0.0. outline included grant proposal. split OpenAPI-parsing functionality separate package, {rapid}. package developed parallel one, contains R API Definition-specific functionality. also realized need package wrapping {httr2} calls. package called {nectar}, also developed parallel one. Export function functions generate R/*.R files call API, given URL OpenAPI spec YAML format (rapid::class_rapid() object). generated files follow encourage best practices, serve core around rest package built. Also generate tests/testthat/*.R file generated function. Generate R/*.R tests/testthat/*.R files authenticate user (using API keys). Produce vignette configuring authentication. Folded main vignette since ’s suprisingly straightforward. Add support APIs using OAS json format. UPDATE: functionality separate package, {anyapi}. Generate R/.R tests/testthat/.R files endpoints (“paths”) described given API specification. generated functions work, error checking, documentation, tests minimal. Update: Also, likely go unsaid, , API description incorrect, functions work expected. Hopefully error messages helpful debugging, though! Add documentation implementing batching rate-limiting. possible, export functionality help implement processes, standards seem vary widely. UPDATE: development version {httr2} functionality help quite lot, thankfully! ’m skipping milestone functionality stabilizes (previously 0.3.0). Add parameter documentation. Also add parameter type checking. Potential challenges: point ’ll need OAS definition document use testing includes possible parameter types. ’ll likely need generate fake API specification goes beyond typical individual example. Add response (return value) documentation. Use expected responses generate better test scaffolds. Potential challenges: Testing generation tests might present unique challenges. ’ll need look testthat tests . Add robust error messaging non-standard responses. Potential challenges: Mocking cases things fail can tricky. Ideally step involve pushing package stable 1.0.0, require enough usage feel confident core function definitions stable.","code":""},{"path":"https://beekeeper.api2r.org/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Rapidly Scaffold API Client Packages","text":"Install development version beekeeper GitHub:","code":"# install.packages(\"pak\") pak::pak(\"jonthegeek/beekeeper\")"},{"path":"https://beekeeper.api2r.org/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Rapidly Scaffold API Client Packages","text":"Use use_beekeeper() generate _beekeeper.yml file, generate_pkg() generate code based configuration. Read vignette(\"beekeeper\") details.","code":""},{"path":"https://beekeeper.api2r.org/index.html","id":"the-api2r-package-verse","dir":"","previous_headings":"","what":"The api2r package ’verse","title":"Rapidly Scaffold API Client Packages","text":"{beekeeper} (package) intended help rapidly create R package interfaces web API. {nectar} applies opinionated framework around {httr2}, aimed making easy create standardized API-wrapping packages. Packages generated {beekeeper} import functions {nectar}, avoid relatively high dependency graph associated {beeekeeper}. {rapid} converts OpenAPI descriptions APIs R objects. objects meant provide standardized starting point {beekeeper} (future packages generate R code API specs, , eventually, API specs R code). {anyapi} intended aid discovery APIs. Eventually may also auto-generate functions interact newly discovered API, functionality yet implemented.","code":""},{"path":"https://beekeeper.api2r.org/index.html","id":"why-beekeeper","dir":"","previous_headings":"","what":"Why “beekeeper”?","title":"Rapidly Scaffold API Client Packages","text":"beekeeper someone tends bees, {beekeeper} package helps tend APIs. “Apis” Latin “bee”, genus name honey bees. addition pun, hope eventually include “hive” hex logos site, hex representing API package “tended” {beekeeper}.","code":""},{"path":"https://beekeeper.api2r.org/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Rapidly Scaffold API Client Packages","text":"Please note beekeeper project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://beekeeper.api2r.org/reference/as_bk_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Prepare rapid objects for beekeeper — as_bk_data","title":"Prepare rapid objects for beekeeper — as_bk_data","text":"Convert rapid objects lists properties use beekeeper templates.","code":""},{"path":"https://beekeeper.api2r.org/reference/as_bk_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prepare rapid objects for beekeeper — as_bk_data","text":"","code":"as_bk_data(x, ...)"},{"path":"https://beekeeper.api2r.org/reference/as_bk_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prepare rapid objects for beekeeper — as_bk_data","text":"x object coerce. Currently supports conversion rapid::class_security_schemes() objects. ... dots future extensions must empty.","code":""},{"path":"https://beekeeper.api2r.org/reference/as_bk_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prepare rapid objects for beekeeper — as_bk_data","text":"list.","code":""},{"path":"https://beekeeper.api2r.org/reference/beekeeper-package.html","id":null,"dir":"Reference","previous_headings":"","what":"beekeeper: Rapidly Scaffold API Client Packages — beekeeper-package","title":"beekeeper: Rapidly Scaffold API Client Packages — beekeeper-package","text":"Automatically generate R package skeletons 'application programming interfaces (APIs)' follow 'OpenAPI Specification (OAS)'. skeletons implement best practices streamline package development.","code":""},{"path":[]},{"path":"https://beekeeper.api2r.org/reference/beekeeper-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"beekeeper: Rapidly Scaffold API Client Packages — beekeeper-package","text":"Maintainer: Jon Harmon jonthegeek@gmail.com (ORCID) [copyright holder] contributors: R Consortium [funder]","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-assert_is_pkg.html","id":null,"dir":"Reference","previous_headings":"","what":"Error if not in package — .assert_is_pkg","title":"Error if not in package — .assert_is_pkg","text":"Error package","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-assert_is_pkg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Error if not in package — .assert_is_pkg","text":"","code":".assert_is_pkg(base_path = usethis::proj_get())"},{"path":"https://beekeeper.api2r.org/reference/dot-assert_is_pkg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Error if not in package — .assert_is_pkg","text":"base_path root URL current project.","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-assert_is_pkg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Error if not in package — .assert_is_pkg","text":"NULL, invisibly.","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-bk_use_template.html","id":null,"dir":"Reference","previous_headings":"","what":"Use a template in this package — .bk_use_template","title":"Use a template in this package — .bk_use_template","text":"Use template package","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-bk_use_template.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use a template in this package — .bk_use_template","text":"","code":".bk_use_template( template, data, ..., target = template, dir = c(\"R\", \"tests/testthat\") )"},{"path":"https://beekeeper.api2r.org/reference/dot-bk_use_template.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use a template in this package — .bk_use_template","text":"template name template. data list variables apply template. ... dots future extensions must empty. target name file create. dir directory file created.","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-bk_use_template.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Use a template in this package — .bk_use_template","text":"path generated updated file, invisibly.","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-is_pkg.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether we're in a package — .is_pkg","title":"Check whether we're in a package — .is_pkg","text":"Inspired usethis:::is_package.","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-is_pkg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether we're in a package — .is_pkg","text":"","code":".is_pkg(base_path = proj_get())"},{"path":"https://beekeeper.api2r.org/reference/dot-is_pkg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check whether we're in a package — .is_pkg","text":"base_path root URL current project.","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-is_pkg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check whether we're in a package — .is_pkg","text":"TRUE project package, FALSE .","code":""},{"path":"https://beekeeper.api2r.org/reference/generate_pkg.html","id":null,"dir":"Reference","previous_headings":"","what":"Use a beekeeper config file to generate code — generate_pkg","title":"Use a beekeeper config file to generate code — generate_pkg","text":"Creates updates package files based information beekeeper config file (generated use_beekeeper() manually). files enforce opinionated framework API packages.","code":""},{"path":"https://beekeeper.api2r.org/reference/generate_pkg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use a beekeeper config file to generate code — generate_pkg","text":"","code":"generate_pkg( config_file = \"_beekeeper.yml\", pkg_agent = generate_pkg_agent(config_file) )"},{"path":"https://beekeeper.api2r.org/reference/generate_pkg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use a beekeeper config file to generate code — generate_pkg","text":"config_file path beekeeper yaml file. pkg_agent string identify package, use user_agent argument nectar::req_setup().","code":""},{"path":"https://beekeeper.api2r.org/reference/generate_pkg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Use a beekeeper config file to generate code — generate_pkg","text":"character vector paths files added updated, invisibly.","code":""},{"path":"https://beekeeper.api2r.org/reference/generate_pkg_agent.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a user agent for the active package — generate_pkg_agent","title":"Create a user agent for the active package — generate_pkg_agent","text":"Create user agent active package","code":""},{"path":"https://beekeeper.api2r.org/reference/generate_pkg_agent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a user agent for the active package — generate_pkg_agent","text":"","code":"generate_pkg_agent(path = \".\")"},{"path":"https://beekeeper.api2r.org/reference/generate_pkg_agent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a user agent for the active package — generate_pkg_agent","text":"path path DESCRIPTION file, directory within package.","code":""},{"path":"https://beekeeper.api2r.org/reference/generate_pkg_agent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a user agent for the active package — generate_pkg_agent","text":"string name package (available) first URL associated package.","code":""},{"path":"https://beekeeper.api2r.org/reference/use_beekeeper.html","id":null,"dir":"Reference","previous_headings":"","what":"Configure a package to use beekeeper — use_beekeeper","title":"Configure a package to use beekeeper — use_beekeeper","text":"Create configuration file package use beekeeper. configuration file tracks information used generation functions, timestamp configuration last updated used.","code":""},{"path":"https://beekeeper.api2r.org/reference/use_beekeeper.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Configure a package to use beekeeper — use_beekeeper","text":"","code":"use_beekeeper( x, api_abbr, ..., config_file = \"_beekeeper.yml\", rapid_file = \"_beekeeper_rapid.rds\" )"},{"path":"https://beekeeper.api2r.org/reference/use_beekeeper.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Configure a package to use beekeeper — use_beekeeper","text":"x object use define configuration. must translatable rapid::class_rapid() object rapid::as_rapid(). Usually url pointing OpenAPI document, list generated reading document. api_abbr short (2-5 letter) abbreviation API, use function names environment variables. ... dots future extensions must empty. config_file path configuration written. rapid_file path R API definition (rapid) object written.","code":""},{"path":"https://beekeeper.api2r.org/reference/use_beekeeper.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Configure a package to use beekeeper — use_beekeeper","text":"path configuration file, invisibly. config file written side effect function. rapid object also written, path file saved config file.","code":""}] +[{"path":[]},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement jonthegeek@gmail.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://beekeeper.api2r.org/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://beekeeper.api2r.org/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to beekeeper","title":"Contributing to beekeeper","text":"outlines propose change beekeeper.","code":""},{"path":"https://beekeeper.api2r.org/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to beekeeper","text":"can fix typos, spelling mistakes, grammatical errors documentation directly using GitHub web interface, long changes made source file. generally means ’ll need edit roxygen2 comments .R, .Rd file. can find .R file generates .Rd reading comment first line.","code":""},{"path":"https://beekeeper.api2r.org/CONTRIBUTING.html","id":"bigger-changes","dir":"","previous_headings":"","what":"Bigger changes","title":"Contributing to beekeeper","text":"want make bigger change, ’s good idea first file issue make sure someone team agrees ’s needed. ’ve found bug, please file issue illustrates bug minimal reprex (also help write unit test, needed).","code":""},{"path":"https://beekeeper.api2r.org/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"Bigger changes","what":"Pull request process","title":"Contributing to beekeeper","text":"Fork package clone onto computer. haven’t done , recommend using usethis::create_from_github(\"jonthegeek/beekeeper\", fork = TRUE). Install development dependencies devtools::install_dev_deps(), make sure package passes R CMD check running devtools::check(). R CMD check doesn’t pass cleanly, ’s good idea ask help continuing. Create Git branch pull request (PR). recommend using usethis::pr_init(\"brief-description--change\"). Make changes, commit git, create PR running usethis::pr_push(), following prompts browser. title PR briefly describe change. body PR contain Fixes #issue-number. user-facing changes, add bullet top NEWS.md (.e. just first header). Follow style described https://style.tidyverse.org/news.html.","code":""},{"path":"https://beekeeper.api2r.org/CONTRIBUTING.html","id":"code-style","dir":"","previous_headings":"Bigger changes","what":"Code style","title":"Contributing to beekeeper","text":"New code follow tidyverse style guide. can use styler package apply styles, please don’t restyle code nothing PR. use roxygen2, Markdown syntax, documentation. use testthat unit tests. Contributions test cases included easier accept.","code":""},{"path":"https://beekeeper.api2r.org/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to beekeeper","text":"Please note beekeeper project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://beekeeper.api2r.org/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 beekeeper authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://beekeeper.api2r.org/SUPPORT.html","id":null,"dir":"","previous_headings":"","what":"Getting help with beekeeper","title":"Getting help with beekeeper","text":"Thanks using beekeeper! filing issue, places explore pieces put together make process smooth possible.","code":""},{"path":"https://beekeeper.api2r.org/SUPPORT.html","id":"make-a-reprex","dir":"","previous_headings":"","what":"Make a reprex","title":"Getting help with beekeeper","text":"Start making minimal reproducible example using reprex package. haven’t heard used reprex , ’re treat! Seriously, reprex make R-question-asking endeavors easier (pretty insane ROI five ten minutes ’ll take learn ’s ). additional reprex pointers, check Get help! section tidyverse site.","code":""},{"path":"https://beekeeper.api2r.org/SUPPORT.html","id":"where-to-ask","dir":"","previous_headings":"","what":"Where to ask?","title":"Getting help with beekeeper","text":"Armed reprex, next step figure ask. ’s question: ’s best ask R4DS Online Learning Community Slack. options include Posit Community, StackOverflow. people answer questions. ’s bug: ’re right place, file issue. ’re sure: let community help figure ! problem bug feature request, can easily return report . opening new issue, sure search issues pull requests make sure bug hasn’t reported /already fixed development version. default, search pre-populated :issue :open. can edit qualifiers (e.g. :pr, :closed) needed. example, ’d simply remove :open search issues repo, open closed.","code":""},{"path":"https://beekeeper.api2r.org/SUPPORT.html","id":"what-happens-next","dir":"","previous_headings":"","what":"What happens next?","title":"Getting help with beekeeper","text":"’ll try look issue soon can, packages maintained volunteers. good reprex particularly important might weeks months initial report start working . can’t reproduce bug, can’t fix !","code":""},{"path":"https://beekeeper.api2r.org/articles/beekeeper.html","id":"step-0-create-your-package","dir":"Articles","previous_headings":"","what":"Step 0: Create your package","title":"Building an API Package","text":"start, first create package. recommend start usethis::create_package() streamline general package-creation steps. can get basic API calls working package two-step process.","code":""},{"path":"https://beekeeper.api2r.org/articles/beekeeper.html","id":"step-1-configure-your-package","dir":"Articles","previous_headings":"","what":"Step 1: Configure your package","title":"Building an API Package","text":"target API follows OAS, can use API’s OpenAPI Document configure package.","code":"# Note: Running these commands will create or overwrite \"_beekeeper.yml\" in your # working directory. url(\"https://api.apis.guru/v2/openapi.yaml\") |> use_beekeeper( api_abbr = \"guru\" ) # Or for the FEC API url(\"https://api.apis.guru/v2/specs/fec.gov/1.0/openapi.yaml\") |> use_beekeeper( api_abbr = \"fec\" )"},{"path":"https://beekeeper.api2r.org/articles/beekeeper.html","id":"step-2-generate-your-package-skeleton","dir":"Articles","previous_headings":"","what":"Step 2: Generate your package skeleton","title":"Building an API Package","text":"valid _beekeeper.yml file, can generate rest package. Right now package export function call API, eventually process also generate functions endpoints specified API’s OpenAPI document. generate_pkg() creates files defining package R directory, tests tests/testthat directory.","code":"# Note: Running this command will create or overwrite files in your R and # tests/testthat directories. generate_pkg()"},{"path":[]},{"path":"https://beekeeper.api2r.org/articles/beekeeper.html","id":"call-r","dir":"Articles","previous_headings":"The generated package","what":"010-call.R","title":"Building an API Package","text":"first file generated package R/010-call.R. file defines function can used call API. Notice function includes API-key authentication arguments appropriate!","code":"# Set up the basic call once at package build. fec_req_base <- nectar::req_setup( \"https://api.open.fec.gov/v1\", user_agent = \"fecapi (https://github.com/jonthegeek/fecapi)\" ) #' Call the OpenFEC API #' #' Generate a request to an OpenFEC endpoint. #' #' @inheritParams nectar::req_modify #' @param api_key An API key provided by the API provider. This key is not #' clearly documented in the API description. Check the API documentation for #' details. #' #' @return The response from the endpoint. #' @export fec_call_api <- function(path, query = NULL, body = NULL, method = NULL, api_key = Sys.getenv(\"FEC_API_KEY\")) { req <- nectar::req_modify( fec_req_base, path = path, query = query, body = body, method = method ) req <- .fec_req_auth(req, api_key = api_key) resp <- nectar::req_perform_opinionated(req) nectar::resp_parse(resp, response_parser = .fec_response_parser) }"},{"path":"https://beekeeper.api2r.org/articles/beekeeper.html","id":"auth-r","dir":"Articles","previous_headings":"The generated package","what":"020-auth.R","title":"Building an API Package","text":"Security API defined R/020-auth.R. initial version file works, may want edit automatic output. case OpenFEC API, description specifies three security schemes overlap one another: one sets X-Api-Key field header, two set api_key query string. names generated functions based names security schemes OpenAPI document. real package, deleted two query functions, since header function sufficient slightly secure. also renamed header function .fec_req_auth_api_key_header_auth .fec_req_auth_api_key_header remove redundant _auth.","code":"# These functions were generated by the {beekeeper} package, based on # components@security_schemes from the source API description. You may want to # delete unused options. In addition, APIs often have additional security # options that are not formally documented in the API description. For example, # for any `location = query` `api_key` options, it might be possible to instead # pass the same parameter in a header, possibly with a different name. Consult # the text description of authentication in your API documentation. .fec_req_auth <- function(req, api_key = NULL) { if (!is.null(api_key)) { req <- .fec_req_auth_api_key_header_auth(req, api_key) req <- .fec_req_auth_api_key_query_auth(req, api_key) req <- .fec_req_auth_api_key(req, api_key) } return(req) } # An API key provided by the API provider. This key is not clearly documented in # the API description. Check the API documentation for details. .fec_req_auth_api_key_header_auth <- function(req, api_key) { nectar::req_auth_api_key( req, location = \"header\", parameter_name = \"X-Api-Key\", api_key = api_key ) } # An API key provided by the API provider. This key is not clearly documented in # the API description. Check the API documentation for details. .fec_req_auth_api_key_query_auth <- function(req, api_key) { nectar::req_auth_api_key( req, location = \"query\", parameter_name = \"api_key\", api_key = api_key ) } # An API key provided by the API provider. This key is not clearly documented in # the API description. Check the API documentation for details. .fec_req_auth_api_key <- function(req, api_key) { nectar::req_auth_api_key( req, location = \"query\", parameter_name = \"api_key\", api_key = api_key ) }"},{"path":"https://beekeeper.api2r.org/articles/beekeeper.html","id":"test-files","dir":"Articles","previous_headings":"The generated package","what":"test files","title":"Building an API Package","text":"generated package also includes tests API. already done , also activates use testthat package. test overall functionality package, provide endpoint path tests/testthat/test-010-call.R. future version beekeeper attempt auto-fill path . Manually edited : may also want add specific tests endpoints require authentication vs endpoints require authentication. future version beekeeper attempt auto-generate tests appropriate (different paths use different security schemes).","code":"httptest2::with_mock_dir(\"api/01-call/valid\", { test_that(\"Can call an endpoint without errors\", { # A path will be auto-filled in a future version of beekeeper. fail( \"Provide any path for this API in PROVIDED_PATH, then delete this fail.\" ) PROVIDED_PATH <- \"path/to/endpoint\" expect_no_error(fec_call_api(PROVIDED_PATH)) }) }) httptest2::with_mock_dir(\"api/01-call/valid\", { test_that(\"Can call an endpoint without errors\", { PROVIDED_PATH <- \"candidates\" expect_no_error(fec_call_api(PROVIDED_PATH)) }) })"},{"path":"https://beekeeper.api2r.org/articles/pagination.html","id":"finding-pagination-information","dir":"Articles","previous_headings":"","what":"Finding pagination information","title":"Pagination","text":"can implement pagination package, need find API implements pagination. can usually find information API documentation. Sometimes information separate “Pagination” section top documentation. Often described individual endpoint documentation (even separately described section). isn’t clearly described, watch pagination-related endpoint parameters, page, pageSize, perPage limit, offset, cursor. tips finding pagination information, see can get lot data API? Web APIs R.","code":""},{"path":"https://beekeeper.api2r.org/articles/pagination.html","id":"implementing-pagination","dir":"Articles","previous_headings":"","what":"Implementing pagination","title":"Pagination","text":"req_perform_iterative() function {httr2} helps implement pagination. uses request helper functions create new request fetch next page. family functions experimental, sure check latest documentation case functions changed. implement pagination package, need edit 010-call.R file generated {beekeeper}. default, perform step handled nectar::req_perform_opinionated() function calls httr2::req_perform() give req object, httr2::req_perform_iterative() supply iteration helper function next_req parameter. example, every endpoint API uses page parameter paginate, replace line something like : default, nectar::req_perform_opinionated() returns 2 responses (max_reqs = 2). verified pagination strategy works, likely want increase limit, usually Inf. nectar::req_perform_opinionated() also implements basic httr2::req_retry() try request 3 times, using default httr2::retry_retry() settings decide failure transient.","code":"resp <- nectar::req_perform_opinionated(req) is_complete <- function(resp) { as.logical(length(httr2::resp_body_json(resp)$data)) } resp <- nectar::req_perform_opinionated( req, next_req = httr2::iterate_with_offset(\"page\", resp_complete = is_complete) )"},{"path":"https://beekeeper.api2r.org/articles/pagination.html","id":"more-complicated-pagination","dir":"Articles","previous_headings":"","what":"More complicated pagination","title":"Pagination","text":"like implement complex pagination, apply transformations req object httr2::req_retry() httr2::req_throttle(), can create perform function. name functions {api_abbr}_req_perform(). example, perform function {fecapi} package: Within 010-call.R, apply function like :","code":".fec_req_perform <- function(req, pagination, per_page, max_results, max_reqs, call) { next_req <- .choose_pagination_fn(pagination, call = call) max_reqs <- min(max_reqs, ceiling(max_results / per_page)) nectar::req_perform_opinionated( req, next_req = next_req, max_reqs = max_reqs ) } .choose_pagination_fn <- function(pagination, call = rlang::caller_env()) { pagination <- .validate_pagination(pagination, call) switch(pagination, basic = .iterator_fn_basic(), none = NULL ) } .validate_pagination <- function(pagination, call = rlang::caller_env()) { rlang::arg_match0( pagination, c(\"none\", \"basic\"), error_call = call ) } .iterator_fn_basic <- function() { httr2::iterate_with_offset( \"page\", resp_pages = function(resp) { httr2::resp_body_json(resp)$pagination$pages } ) } resp <- .fec_req_perform( req, pagination = pagination, per_page = query$per_page, max_results = max_results, max_reqs = max_reqs )"},{"path":"https://beekeeper.api2r.org/articles/pagination.html","id":"help-us-improve","dir":"Articles","previous_headings":"","what":"Help us improve","title":"Pagination","text":"find pattern pagination implementation API description /endpoint function parameters, please submit issue pull request help us improve output package.","code":""},{"path":"https://beekeeper.api2r.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Jon Harmon. Author, maintainer, copyright holder. R Consortium. Funder.","code":""},{"path":"https://beekeeper.api2r.org/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Harmon J (2024). beekeeper: Rapidly Scaffold API Client Packages. R package version 0.4.0.9000, https://github.com/jonthegeek/beekeeper, https://beekeeper.api2r.org.","code":"@Manual{, title = {beekeeper: Rapidly Scaffold API Client Packages}, author = {Jon Harmon}, year = {2024}, note = {R package version 0.4.0.9000, https://github.com/jonthegeek/beekeeper}, url = {https://beekeeper.api2r.org}, }"},{"path":"https://beekeeper.api2r.org/index.html","id":"beekeeper-","dir":"","previous_headings":"","what":"Rapidly Scaffold API Client Packages","title":"Rapidly Scaffold API Client Packages","text":"Use beekeeper create maintain R packages wrap APIs. generated packages follow best practices, including documentation testing. package focuses APIs follow OpenAPI Specification (OAS). Currently versions 3.0 3.1 supported, support swagger 2.0 come. APIs must API document yaml format. package skeletons generated beekeeper implement best practices streamline package development.","code":""},{"path":"https://beekeeper.api2r.org/index.html","id":"the-plan","dir":"","previous_headings":"","what":"The Plan","title":"Rapidly Scaffold API Client Packages","text":"project accepted R Consortium 2023 ISC Grant Program! rough outline planned development milestones package, working toward stable version 1.0.0. outline included grant proposal. split OpenAPI-parsing functionality separate package, {rapid}. package developed parallel one, contains R API Definition-specific functionality. also realized need package wrapping {httr2} calls. package called {nectar}, also developed parallel one. Export function functions generate R/*.R files call API, given URL OpenAPI spec YAML format (rapid::class_rapid() object). generated files follow encourage best practices, serve core around rest package built. Also generate tests/testthat/*.R file generated function. Generate R/*.R tests/testthat/*.R files authenticate user (using API keys). Produce vignette configuring authentication. Folded main vignette since ’s suprisingly straightforward. Add support APIs using OAS json format. UPDATE: functionality separate package, {anyapi}. Generate R/.R tests/testthat/.R files endpoints (“paths”) described given API specification. generated functions work, error checking, documentation, tests minimal. Update: Also, likely go unsaid, , API description incorrect, functions work expected. Hopefully error messages helpful debugging, though! Add documentation implementing batching rate-limiting. possible, export functionality help implement processes, standards seem vary widely. UPDATE: development version {httr2} functionality help quite lot, thankfully! ’m skipping milestone functionality stabilizes (previously 0.3.0). Add parameter documentation. Also add parameter type checking. Potential challenges: point ’ll need OAS definition document use testing includes possible parameter types. ’ll likely need generate fake API specification goes beyond typical individual example. Add response (return value) documentation. Use expected responses generate better test scaffolds. Potential challenges: Testing generation tests might present unique challenges. ’ll need look testthat tests . Add robust error messaging non-standard responses. Potential challenges: Mocking cases things fail can tricky. Ideally step involve pushing package stable 1.0.0, require enough usage feel confident core function definitions stable.","code":""},{"path":"https://beekeeper.api2r.org/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Rapidly Scaffold API Client Packages","text":"Install development version beekeeper GitHub:","code":"# install.packages(\"pak\") pak::pak(\"jonthegeek/beekeeper\")"},{"path":"https://beekeeper.api2r.org/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Rapidly Scaffold API Client Packages","text":"Use use_beekeeper() generate _beekeeper.yml file, generate_pkg() generate code based configuration. Read vignette(\"beekeeper\") details.","code":""},{"path":"https://beekeeper.api2r.org/index.html","id":"the-api2r-package-verse","dir":"","previous_headings":"","what":"The api2r package ’verse","title":"Rapidly Scaffold API Client Packages","text":"{beekeeper} (package) intended help rapidly create R package interfaces web API. {nectar} applies opinionated framework around {httr2}, aimed making easy create standardized API-wrapping packages. Packages generated {beekeeper} import functions {nectar}, avoid relatively high dependency graph associated {beeekeeper}. {rapid} converts OpenAPI descriptions APIs R objects. objects meant provide standardized starting point {beekeeper} (future packages generate R code API specs, , eventually, API specs R code). {anyapi} intended aid discovery APIs. Eventually may also auto-generate functions interact newly discovered API, functionality yet implemented.","code":""},{"path":"https://beekeeper.api2r.org/index.html","id":"why-beekeeper","dir":"","previous_headings":"","what":"Why “beekeeper”?","title":"Rapidly Scaffold API Client Packages","text":"beekeeper someone tends bees, {beekeeper} package helps tend APIs. “Apis” Latin “bee”, genus name honey bees. addition pun, hope eventually include “hive” hex logos site, hex representing API package “tended” {beekeeper}.","code":""},{"path":"https://beekeeper.api2r.org/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Rapidly Scaffold API Client Packages","text":"Please note beekeeper project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://beekeeper.api2r.org/reference/as_bk_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Prepare rapid objects for beekeeper — as_bk_data","title":"Prepare rapid objects for beekeeper — as_bk_data","text":"Convert rapid objects lists properties use beekeeper templates.","code":""},{"path":"https://beekeeper.api2r.org/reference/as_bk_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prepare rapid objects for beekeeper — as_bk_data","text":"","code":"as_bk_data(x, ...)"},{"path":"https://beekeeper.api2r.org/reference/as_bk_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prepare rapid objects for beekeeper — as_bk_data","text":"x object coerce. Currently supports conversion rapid::class_security_schemes() objects. ... dots future extensions must empty.","code":""},{"path":"https://beekeeper.api2r.org/reference/as_bk_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prepare rapid objects for beekeeper — as_bk_data","text":"list.","code":""},{"path":"https://beekeeper.api2r.org/reference/beekeeper-package.html","id":null,"dir":"Reference","previous_headings":"","what":"beekeeper: Rapidly Scaffold API Client Packages — beekeeper-package","title":"beekeeper: Rapidly Scaffold API Client Packages — beekeeper-package","text":"Automatically generate R package skeletons 'application programming interfaces (APIs)' follow 'OpenAPI Specification (OAS)'. skeletons implement best practices streamline package development.","code":""},{"path":[]},{"path":"https://beekeeper.api2r.org/reference/beekeeper-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"beekeeper: Rapidly Scaffold API Client Packages — beekeeper-package","text":"Maintainer: Jon Harmon jonthegeek@gmail.com (ORCID) [copyright holder] contributors: R Consortium [funder]","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-assert_is_pkg.html","id":null,"dir":"Reference","previous_headings":"","what":"Error if not in package — .assert_is_pkg","title":"Error if not in package — .assert_is_pkg","text":"Error package","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-assert_is_pkg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Error if not in package — .assert_is_pkg","text":"","code":".assert_is_pkg(base_path = usethis::proj_get())"},{"path":"https://beekeeper.api2r.org/reference/dot-assert_is_pkg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Error if not in package — .assert_is_pkg","text":"base_path root URL current project.","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-assert_is_pkg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Error if not in package — .assert_is_pkg","text":"NULL, invisibly.","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-bk_use_template.html","id":null,"dir":"Reference","previous_headings":"","what":"Use a template in this package — .bk_use_template","title":"Use a template in this package — .bk_use_template","text":"Use template package","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-bk_use_template.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use a template in this package — .bk_use_template","text":"","code":".bk_use_template( template, data, ..., target = template, dir = c(\"R\", \"tests/testthat\") )"},{"path":"https://beekeeper.api2r.org/reference/dot-bk_use_template.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use a template in this package — .bk_use_template","text":"template name template. data list variables apply template. ... dots future extensions must empty. target name file create. dir directory file created.","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-bk_use_template.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Use a template in this package — .bk_use_template","text":"path generated updated file, invisibly.","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-is_pkg.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether we're in a package — .is_pkg","title":"Check whether we're in a package — .is_pkg","text":"Inspired usethis:::is_package.","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-is_pkg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether we're in a package — .is_pkg","text":"","code":".is_pkg(base_path = proj_get())"},{"path":"https://beekeeper.api2r.org/reference/dot-is_pkg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check whether we're in a package — .is_pkg","text":"base_path root URL current project.","code":""},{"path":"https://beekeeper.api2r.org/reference/dot-is_pkg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check whether we're in a package — .is_pkg","text":"TRUE project package, FALSE .","code":""},{"path":"https://beekeeper.api2r.org/reference/generate_pkg.html","id":null,"dir":"Reference","previous_headings":"","what":"Use a beekeeper config file to generate code — generate_pkg","title":"Use a beekeeper config file to generate code — generate_pkg","text":"Creates updates package files based information beekeeper config file (generated use_beekeeper() manually). files enforce opinionated framework API packages.","code":""},{"path":"https://beekeeper.api2r.org/reference/generate_pkg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use a beekeeper config file to generate code — generate_pkg","text":"","code":"generate_pkg( config_file = \"_beekeeper.yml\", pkg_agent = generate_pkg_agent(config_file) )"},{"path":"https://beekeeper.api2r.org/reference/generate_pkg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use a beekeeper config file to generate code — generate_pkg","text":"config_file path beekeeper yaml file. pkg_agent string identify package, use user_agent argument nectar::req_setup().","code":""},{"path":"https://beekeeper.api2r.org/reference/generate_pkg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Use a beekeeper config file to generate code — generate_pkg","text":"character vector paths files added updated, invisibly.","code":""},{"path":"https://beekeeper.api2r.org/reference/generate_pkg_agent.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a user agent for the active package — generate_pkg_agent","title":"Create a user agent for the active package — generate_pkg_agent","text":"Create user agent active package","code":""},{"path":"https://beekeeper.api2r.org/reference/generate_pkg_agent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a user agent for the active package — generate_pkg_agent","text":"","code":"generate_pkg_agent(path = \".\")"},{"path":"https://beekeeper.api2r.org/reference/generate_pkg_agent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a user agent for the active package — generate_pkg_agent","text":"path path DESCRIPTION file, directory within package.","code":""},{"path":"https://beekeeper.api2r.org/reference/generate_pkg_agent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a user agent for the active package — generate_pkg_agent","text":"string name package (available) first URL associated package.","code":""},{"path":"https://beekeeper.api2r.org/reference/use_beekeeper.html","id":null,"dir":"Reference","previous_headings":"","what":"Configure a package to use beekeeper — use_beekeeper","title":"Configure a package to use beekeeper — use_beekeeper","text":"Create configuration file package use beekeeper. configuration file tracks information used generation functions, timestamp configuration last updated used.","code":""},{"path":"https://beekeeper.api2r.org/reference/use_beekeeper.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Configure a package to use beekeeper — use_beekeeper","text":"","code":"use_beekeeper( x, api_abbr, ..., config_file = \"_beekeeper.yml\", rapid_file = \"_beekeeper_rapid.rds\" )"},{"path":"https://beekeeper.api2r.org/reference/use_beekeeper.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Configure a package to use beekeeper — use_beekeeper","text":"x object use define configuration. must translatable rapid::class_rapid() object rapid::as_rapid(). Usually url pointing OpenAPI document, list generated reading document. api_abbr short (2-5 letter) abbreviation API, use function names environment variables. ... dots future extensions must empty. config_file path configuration written. rapid_file path R API definition (rapid) object written.","code":""},{"path":"https://beekeeper.api2r.org/reference/use_beekeeper.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Configure a package to use beekeeper — use_beekeeper","text":"path configuration file, invisibly. config file written side effect function. rapid object also written, path file saved config file.","code":""}]
Harmon J (2024). beekeeper: Rapidly Scaffold API Client Packages. -R package version 0.4.0, https://github.com/jonthegeek/beekeeper, https://beekeeper.api2r.org. +R package version 0.4.0.9000, https://github.com/jonthegeek/beekeeper, https://beekeeper.api2r.org.
@Manual{, title = {beekeeper: Rapidly Scaffold API Client Packages}, author = {Jon Harmon}, year = {2024}, - note = {R package version 0.4.0, https://github.com/jonthegeek/beekeeper}, + note = {R package version 0.4.0.9000, https://github.com/jonthegeek/beekeeper}, url = {https://beekeeper.api2r.org}, }