Title: | Rapidly Scaffold API Client Packages |
---|---|
Description: | Automatically generate R package skeletons from 'application programming interfaces (APIs)' that follow the 'OpenAPI Specification (OAS)'. The skeletons implement best practices to streamline package development. |
Authors: | Jon Harmon [aut, cre, cph] , R Consortium [fnd] |
Maintainer: | Jon Harmon <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.4.0.9000 |
Built: | 2024-10-26 05:57:48 UTC |
Source: | https://github.com/jonthegeek/beekeeper |
Creates or updates package files based on the information in a beekeeper
config file (generated by use_beekeeper()
or manually). The files enforce
an opinionated framework for API packages.
generate_pkg( config_file = "_beekeeper.yml", pkg_agent = generate_pkg_agent(config_file) )
generate_pkg( config_file = "_beekeeper.yml", pkg_agent = generate_pkg_agent(config_file) )
config_file |
The path to a beekeeper yaml file. |
pkg_agent |
A string to identify this package, for use in the
|
A character vector of paths to files that were added or updated, invisibly.
Create a user agent for the active package
generate_pkg_agent(path = ".")
generate_pkg_agent(path = ".")
path |
The path to the DESCRIPTION file, or to a directory within a package. |
A string with the name of the package and (if available) the first URL associated with the package.
Create a configuration file for a package to use beekeeper. The configuration file tracks information that will be used for generation of other functions, and the timestamp when the configuration was last updated or used.
use_beekeeper( x, api_abbr, ..., config_file = "_beekeeper.yml", rapid_file = "_beekeeper_rapid.rds" )
use_beekeeper( x, api_abbr, ..., config_file = "_beekeeper.yml", rapid_file = "_beekeeper_rapid.rds" )
x |
An object to use to define the configuration. It must be
translatable to a |
api_abbr |
A short (about 2-5 letter) abbreviation for the API, for use in function names and environment variables. |
... |
These dots are for future extensions and must be empty. |
config_file |
The path to which the configuration should be written. |
rapid_file |
The path to which the R API definition (rapid) object should be written. |
The path to the configuration file, invisibly. The config file is written as a side effect of this function. The rapid object is also written, and the path to that file is saved in the config file.