当前位置: 首页>>编程示例 >>用法及示例精选 >>正文


R googledrive drive_deauth 暂停授权

将 googledrive 置于取消授权状态。 googledrive 将发送 API key ,而不是发送令牌。这可用于访问无需 Google 登录的公共资源。这对于在非交互式设置中使用 googledrive 发出不需要令牌的请求非常方便。它将阻止尝试在浏览器中以交互方式获取令牌。用户可以通过 drive_auth_configure() 配置自己的 API key ,并通过 drive_api_key() 检索该 key 。如果没有用户配置的 key ,则使用内置的默认 key 。

用法

drive_deauth()

也可以看看

其他验证函数:drive_auth_configure()drive_auth()drive_scopes()

例子

if (FALSE) { # rlang::is_interactive()
drive_deauth()
drive_user()

# in a deauth'ed state, we can still get metadata on a world-readable file
public_file <- drive_example_remote("chicken.csv")
public_file
# we can still download it too
drive_download(public_file)
}
源代码:R/drive_auth.R

相关用法


注:本文由纯净天空筛选整理自Jennifer Bryan等大神的英文原创作品 Suspend authorization。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。