knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) library(yq)
You can install the development version of yq from GitHub with:
remotes::install_github("openbiox/yq")
Firstly, you should let YuQue know who you are by running yq_config()
.
You will need to answer some questions.
> library(yq) > yq_config() Please type your login name of YuQue: (type e to exit) shixiangwang Do you want to input token? (type ENTER to proceed) Please type your token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Found token, checking it... Saving info to ~/.yuque.json Updating login Updating token Done. Enjoy this tool. - Shixiang
Next, you can run yq_whoami()
to check if your profile is right.
> yq_whoami() type : User id : 471931 login : shixiangwang name : 王诗翔 description : https://shixiangwang.github.io/home/ books_count : 3 public_books_count : 2 followers_count : 0 following_count : 0 created_at : 2019-09-01T09:21:50.000Z updated_at : 2019-09-03T06:43:10.000Z limits : 49899
The token can be obtained from YuQue account. More please run
?yq_whoami
to see documentation.
The main API of yq package is yq()
function. You can send any queries
to YuQue API URL https://www.yuque.com/api/v2 or set custom API URL by .api_url
argument.
All user functions are built on the top of yq()
.
args(yq)
This package is under heavy development, many features shown in YuQue API have not yet implemented. I will give a short intro to functions available.
yq_whoami
- return personal profileyq_token
- return your token used by API queryyq_config
- set your login name and token (you can re-run it to reset)yq_list_groups
- return personal groupsyq_list_public_groups
- return public groupsyq_list_group_info
- return group info and your abilityyq_list_groups()
yq_list_groups(verbose = "all")
yq_list_public_groups()
yq_list_group_info(login = "elegant-r")
Please note that the 'yq' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.