qiita_item {qiitr} | R Documentation |
Qiita Item (Article) API
Description
Get, post, delete, stock or unstock articles via Qiita API.
Usage
qiita_get_items(
item_id = NULL,
tag_id = NULL,
user_id = NULL,
query = NULL,
per_page = 100L,
page_offset = 0L,
page_limit = 1L
)
qiita_post_item(
title,
body,
tags = qiita_util_tag("R"),
coediting = FALSE,
private = TRUE,
gist = FALSE,
tweet = FALSE
)
qiita_delete_item(item_id)
qiita_update_item(
item_id,
title,
body,
tags = list(qiita_util_tag("R")),
private = TRUE
)
qiita_stock_item(item_id)
qiita_unstock_item(item_id)
qiita_is_stocked_item(item_id)
qiita_get_stocks(user_id, per_page = 100L, page_offset = 0L, page_limit = 1L)
Arguments
item_id |
Item (Article) ID. |
tag_id |
Tag IDs (e.g. |
user_id |
User ID (e.g. |
query |
Query string (e.g. |
per_page |
Number of items per one page. |
page_offset |
Number of offset pages. |
page_limit |
Max number of pages to retrieve. |
title |
Title. |
body |
Content body. |
tags |
Tags. Use |
coediting |
If |
private |
If |
gist |
If |
tweet |
If |
Examples
## Not run:
# get items by item ID
qiita_get_items(item_id = "7a78d897810446dd6a3b")
# get items by tag ID
qiita_get_items(tag_id = c("dplyr", "tidyr"), per_pages = 10L, page_limit = 1L)
# get items by user ID
qiita_get_items(user_id = "yutannihilation")
# Post an item. Note that the post is private by default.
# You should manually check if the post is valid before make it public.
item <- qiita_post_item(title = "test", body = "This is an example.")
# update the post
qiita_update_item(item$id, title = "test", body = "**This is a strong example!**")
# delete the post
qiita_delete_item(item$id)
## End(Not run)
[Package qiitr version 0.1.1 Index]