Skip to content

Commit

Permalink
docs: improve example and doc of keyring::key_set()
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Dec 20, 2024
1 parent 315b94f commit d908e3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ Sys.setenv("DEEPL_API_URL" = "https://api.deepl.com")
Set your API key via the environment variable `DEEPL_API_KEY`.

You could store it with the [keyring](https://r-lib.github.io/keyring/index.html) package, once per user/machine.
The code below will prompt you to enter your API key interactively.

```r
keyring::key_set("deepl") # will prompt you to enter the key interactively
keyring::key_set("deepl", prompt = "API key:")
```

In any script you use babeldown, you'd retrieve the key like so:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ Set your API key via the environment variable `DEEPL_API_KEY`.

You could store it with the
[keyring](https://r-lib.github.io/keyring/index.html) package, once per
user/machine.
user/machine. The code below will prompt you to enter your API key
interactively.

``` r
keyring::key_set("deepl") # will prompt you to enter the key interactively
keyring::key_set("deepl", prompt = "API key:")
```

In any script you use babeldown, you’d retrieve the key like so:
Expand Down

0 comments on commit d908e3f

Please sign in to comment.