Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
msberends committed May 23, 2022
1 parent 87f97af commit 63b6cf8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: certeapi
Title: A Certe R Package for Providing an Application Programming Interface
Version: 0.1.4
Version: 0.1.5
Authors@R: c(
person(given = c("Matthijs", "S."),
family = "Berends",
Expand Down
2 changes: 1 addition & 1 deletion R/get.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#' Get File Locations
#'
#' Use [get_model()] to retrieve the prediction model, which should be an RDS file.
#' Use [get_model_path()] to retrieve the prediction model path, which should be an RDS file.
#' @name get
#' @rdname get
#' @export
Expand Down
10 changes: 3 additions & 7 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,13 @@
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
# ===================================================================== #

pkg_env <- new.env(hash = FALSE)

`%||%` <- function(x, y) if (is.null(x)) y else x

api2rd <- function() {
lines <- readLines(get_api_file())
lines <- lines[lines %like% "^#\\* " & lines %unlike% "@api"]

lines <- gsub("#\\* @get (.*)", "\n## `\\1` (method `GET`):", lines)
lines <- gsub("#\\* @post (.*)", "\n## `\\1` (method `POST`):", lines)
lines <- gsub("#\\* @delete (.*)", "\n## `\\1` (method `DELETE`):", lines)
lines <- gsub("#\\* @get (.*)", "\n## `[GET] \\1`:", lines)
lines <- gsub("#\\* @post (.*)", "\n## `[POST] \\1`:", lines)
lines <- gsub("#\\* @delete (.*)", "\n## `[DELETE] \\1`:", lines)

lines <- gsub("#\\* @serializer (.*)", "\n\nSerializer: `\\1`\n\n", lines)

Expand Down
2 changes: 1 addition & 1 deletion man/endpoints.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 63b6cf8

Please sign in to comment.