Skip to contents

Use beekeeper to create and maintain R packages that wrap APIs. The generated packages follow best practices, including documentation and testing.

This package focuses on APIs that follow the OpenAPI Specification (OAS). Currently versions 3.0 and 3.1 are supported, with support for swagger 2.0 to come. The APIs must have an API document in yaml format. The package skeletons generated by beekeeper implement best practices to streamline package development.

Installation

Install the latest release from GitHub:

# install.packages("pak")
pak::pak("api2r/beekeeper@*release")

Usage

Use use_beekeeper() to generate a _beekeeper.yml file, and then generate_pkg() to generate code based on that configuration.

Read vignette("beekeeper") for more details.

The api2r package ’verse

  • {beekeeper} (this package) is intended to help you rapidly create an R package that interfaces with a web API.
  • {nectar} applies an opinionated framework around {httr2}, aimed at making it easy to create standardized API-wrapping packages. Packages generated by {beekeeper} import functions from {nectar}, to avoid the relatively high dependency graph associated with {beeekeeper}.
  • {rapid} converts OpenAPI descriptions of APIs to R objects. These objects are meant to provide a standardized starting point for {beekeeper} (and any future packages that generate R code from API specs, or, eventually, API specs from R code).
  • {anyapi} is intended to aid in the discovery of APIs. Eventually it may also auto-generate functions to interact with a newly discovered API, but that functionality is not yet implemented.

Why “beekeeper”?

A beekeeper is someone who tends to bees, and {beekeeper} is a package that helps you tend to APIs. “Apis” is Latin for “bee”, and is the genus name for honey bees.

In addition to the pun, I hope to eventually include a “hive” of hex logos on this site, with each hex representing an API package that has been “tended” by {beekeeper}.

Code of Conduct

Please note that the beekeeper project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.