GithubHelp home page GithubHelp logo

yq's Introduction

yq: An R client to access ‘YuQue’ API

Lifecycle: experimental AppVeyor build status Travis build status Codecov test coverage

Installation

You can install the development version of yq from GitHub with:

remotes::install_github("openbiox/yq")

Configuration

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.

Usage

Main API

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)
#> function (endpoint, ..., .token = NULL, .destfile = NULL, .overwrite = FALSE, 
#>     .api_url = NULL, .method = "GET", .send_headers = NULL) 
#> NULL

User functions

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 profile
  • yq_token - return your token used by API query
  • yq_config - set your login name and token (you can re-run it to reset)
  • yq_list_groups - return personal groups
  • yq_list_public_groups - return public groups
  • yq_list_group_info - return group info and your ability

Show cases

yq_list_groups()
#> 优雅R 生信技能树 隐藏库
yq_list_groups(verbose = "all")
#> 
#> ---------------------------------------------------------------------------
#> login        name         books   topics   members   description           
#> ------------ ------------ ------- -------- --------- ----------------------
#> elegant-r    优雅R        1       0        1         「优雅R」公众号       
#> 
#> biotrainee   生信技能树   2       0        60        生信技能树 创建于     
#>                                                      2016年8月,是**第   
#>                                                      一家专注于生信知识体  
#>                                                      系完善、促进生信学习  
#>                                                      交流的论坛。我们通过  
#>                                                      收集国内外生信学习资  
#>                                                      源,邀请大神分享的领  
#>                                                      域专业知识,发布菜鸟  
#>                                                      的真实学习笔记,搭建  
#>                                                      生信技术人员联盟,    
#> 
#> hidden       隐藏库       0       0        1         用来测试              
#> ---------------------------------------------------------------------------
#> 
#> Table: Info of Group
yq_list_public_groups()
#> guomics_protocol 通用电商团队模板 支持中心 大数据中心 供应链中心 研发中心 APP中心 运营中心 甩团 寄样 开智课程合作 电子签约h5 CMICT_基础知识库 运维 天印旗舰版 量化投资 财富号官方团队 人力行政部 Choppy Platform 教学资源
yq_list_group_info(login = "elegant-r")
#> 
#> ----------------------------------------------------------------
#> login       name    books   topics   members   description      
#> ----------- ------- ------- -------- --------- -----------------
#> elegant-r   优雅R   1       0        1         「优雅R」公众号  
#> ----------------------------------------------------------------
#> 
#> Table: Info of Group
#> 
#> 
#> -----------------------------------------------
#> level        read   create   update   destroy  
#> ------------ ------ -------- -------- ---------
#> overall      TRUE   NA       TRUE     TRUE     
#> 
#> group_user   NA     TRUE     TRUE     TRUE     
#> 
#> repo         NA     TRUE     TRUE     TRUE     
#> -----------------------------------------------
#> 
#> Table: Ability to Group

Code of Conduct

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.

yq's People

Contributors

shixiangwang avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

yq's Issues

Weekly Digest (28 August, 2019 - 4 September, 2019)

Here's the Weekly Digest for ShixiangWang/yq:


ISSUES

Last week, no issues were created.


PULL REQUESTS

Last week, no pull requests were created, updated or merged.


COMMITS

Last week there were 12 commits.
🛠️ ✨ add two list_ funs by ShixiangWang
🛠️ ✏️ Fix auth by ShixiangWang
🛠️ ✏️ fix doc by ShixiangWang
🛠️ Fix parse by ShixiangWang
🛠️ Fix config by ShixiangWang
🛠️ Add config by ShixiangWang
🛠️ Add test and doc by ShixiangWang
🛠️ Add test by ShixiangWang
🛠️ Add CI tools by ShixiangWang
🛠️ Push to github by ShixiangWang
🛠️ del config file by ShixiangWang
🛠️ Initial commit by ShixiangWang


CONTRIBUTORS

Last week there was 1 contributor.
👤 ShixiangWang


STARGAZERS

Last week there were 2 stagazers.
ShixiangWang
YTLogos
You all are the stars! 🌟


RELEASES

Last week there were no releases.


That's all for last week, please 👀 Watch and Star the repository ShixiangWang/yq to receive next weekly updates. 😃

You can also view all Weekly Digests by clicking here.

Your Weekly Digest bot. 📆

Weekly Digest (1 September, 2019 - 8 September, 2019)

Here's the Weekly Digest for ShixiangWang/yq:


ISSUES

Last week 1 issue was created.
It is still open.

OPEN ISSUES

💚 #2 关于输出 log信息 , by ShixiangWang


PULL REQUESTS

Last week, no pull requests were created, updated or merged.


COMMITS

Last week there were 14 commits.
🛠️ 📝 Add doc by ShixiangWang
🛠️ finish some list funs and doc them by ShixiangWang
🛠️ ✨ add two list_ funs by ShixiangWang
🛠️ ✏️ Fix auth by ShixiangWang
🛠️ ✏️ fix doc by ShixiangWang
🛠️ Fix parse by ShixiangWang
🛠️ Fix config by ShixiangWang
🛠️ Add config by ShixiangWang
🛠️ Add test and doc by ShixiangWang
🛠️ Add test by ShixiangWang
🛠️ Add CI tools by ShixiangWang
🛠️ Push to github by ShixiangWang
🛠️ del config file by ShixiangWang
🛠️ Initial commit by ShixiangWang


CONTRIBUTORS

Last week there was 1 contributor.
👤 ShixiangWang


STARGAZERS

Last week there were 2 stagazers.
ShixiangWang
YTLogos
You all are the stars! 🌟


RELEASES

Last week there were no releases.


That's all for last week, please 👀 Watch and Star the repository ShixiangWang/yq to receive next weekly updates. 😃

You can also view all Weekly Digests by clicking here.

Your Weekly Digest bot. 📆

Weekly Digest (8 September, 2019 - 15 September, 2019)

Here's the Weekly Digest for ShixiangWang/yq:


ISSUES

Last week, no issues were created.


PULL REQUESTS

Last week, no pull requests were created, updated or merged.


COMMITS

Last week there were 4 commits.
🛠️ Add purrr to import by ShixiangWang
🛠️ What's wrong? by ShixiangWang
🛠️ Change wrap width by ShixiangWang
🛠️ ✨Add list group member by ShixiangWang


CONTRIBUTORS

Last week there was 1 contributor.
👤 ShixiangWang


STARGAZERS

Last week there were no stargazers.


RELEASES

Last week there were no releases.


That's all for last week, please 👀 Watch and Star the repository ShixiangWang/yq to receive next weekly updates. 😃

You can also view all Weekly Digests by clicking here.

Your Weekly Digest bot. 📆

Weekly Digest (22 September, 2019 - 29 September, 2019)

Here's the Weekly Digest for ShixiangWang/yq:


ISSUES

Last week, no issues were created.


PULL REQUESTS

Last week, no pull requests were created, updated or merged.


COMMITS

Last week there were no commits.


CONTRIBUTORS

Last week there were no contributors.


STARGAZERS

Last week there were no stargazers.


RELEASES

Last week there were no releases.


That's all for last week, please 👀 Watch and Star the repository ShixiangWang/yq to receive next weekly updates. 😃

You can also view all Weekly Digests by clicking here.

Your Weekly Digest bot. 📆

Weekly Digest (15 September, 2019 - 22 September, 2019)

Here's the Weekly Digest for ShixiangWang/yq:


ISSUES

Last week, no issues were created.


PULL REQUESTS

Last week, no pull requests were created, updated or merged.


COMMITS

Last week there were no commits.


CONTRIBUTORS

Last week there were no contributors.


STARGAZERS

Last week there were no stargazers.


RELEASES

Last week there were no releases.


That's all for last week, please 👀 Watch and Star the repository ShixiangWang/yq to receive next weekly updates. 😃

You can also view all Weekly Digests by clicking here.

Your Weekly Digest bot. 📆

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.