Description Usage Arguments Details Value Examples
Reports basic profile for the YuQue user.
1 2 |
.token |
Authentication token. Default to YUQUE_TOKEN environment variables, in this order if any is set. |
.api_url |
YuQue API url (default: https://www.yuque.com/api/v2). Used
if |
.send_headers |
Named character vector of header field values
(excepting |
show |
default is |
Get a personal access token for the YuQue API from
https://www.yuque.com/settings and select the scopes necessary for
your planned tasks. The repo
scope, for example, is one many are
likely to need. The token itself is a string of 40 letters and digits.
You can set it using yq_config function. You can also store it any way
you like and provide explicitly via the .token
argument to yq()
.
However, you can also define an environment variable YUQUE_TOKEN
with this value in their .Renviron
file. Add a
line that looks like this, substituting your PAT:
1 | YUQUE_TOKEN=8c70fd8419398999c9ac5bacf3192882193cadf2
|
Put a line break at the end! If you're using an editor that shows line
numbers, there should be (at least) two lines, where the second one is empty.
Restart R for this to take effect. Call yq_whoami()
to confirm
success.
To get complete information on the authenticated user, call
yq("/users/your_login_name")
.
a data.frame
1 2 3 4 5 | ## Not run:
yq_whoami()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.