File: deprecated.R

package info (click to toggle)
r-cran-googledrive 2.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,584 kB
  • sloc: sh: 13; makefile: 2
file content (64 lines) | stat: -rw-r--r-- 1,935 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#' Deprecated googledrive functions
#'
#' @description
#' `r lifecycle::badge("deprecated")`
#'
#' @section `drive_auth_config()`:
#'
#' This function is defunct.
#' * Use [drive_auth_configure()] to configure your own OAuth client or API key.
#' * Use [drive_deauth()] to go into a de-authorized state.
#' * Use [drive_oauth_client()] to retrieve a user-configured client, if it
#'   exists.
#' * Use [drive_api_key()] to retrieve a user-configured API key, if it exists.
#'
#' @section `drive_oauth_app()`:
#'
#' In light of the new [gargle::gargle_oauth_client()] constructor and class of
#' the same name, `drive_oauth_app()` is being replaced by
#' [drive_oauth_client()].
#'
#' @section `drive_example()`:
#'
#' This function is defunct. Access example files with [drive_examples_local()],
#' [drive_example_local()], [drive_examples_remote()], and
#' [drive_example_remote()].
#'
#' @keywords internal
#' @name googledrive-deprecated
NULL

#' @rdname googledrive-deprecated
#' @inheritParams drive_auth_configure
#' @export
drive_auth_config <- function(active, app, path, api_key) {
  lifecycle::deprecate_stop(
    "1.0.0",
    "drive_auth_config()",
    details = c(
      "Use `drive_auth_configure()` to configure your own OAuth client or API key.",
      "Use `drive_deauth()` to go into a de-authorized state.",
      "Use `drive_oauth_client()` to retrieve a user-configured client, if it exists.",
      "Use `drive_api_key()` to retrieve a user-configured API key, if it exists."
    )
  )
}

#' @rdname googledrive-deprecated
#' @export
drive_oauth_app <- function() {
  lifecycle::deprecate_warn(
    "2.1.0", "drive_oauth_app()", "drive_oauth_client()"
  )
  drive_oauth_client()
}

#' @rdname googledrive-deprecated
#' @export
drive_example <- function(path = NULL) {
  lifecycle::deprecate_stop(
    "2.0.0",
    what = "drive_example()",
    with = I("`drive_examples_local()` or `drive_example_local()`")
  )
}