pocket_add: pocket_add

Description Usage Arguments Details Value

View source: R/pocket_add.R

Description

Add one or more items to your Pocket account.

Usage

1
2
3
4
5
6
7
8
pocket_add(
  add_urls,
  item_ids = "",
  tags = NULL,
  success = TRUE,
  consumer_key = Sys.getenv("POCKET_CONSUMER_KEY"),
  access_token = Sys.getenv("POCKET_ACCESS_TOKEN")
)

Arguments

add_urls

Character vector. The URL or URLs you want to add to your Pocket list.

item_ids

Character vector. The item_ids of the items you want to add. Defaults to empty character vector.

tags

Character vector. One or more tags to be applied to all of the newly added URLs. Defaults to NULL.

success

Logical. Enables success/failure messages for every URL. Defaults to TRUE. Needs GET permission if TRUE.

consumer_key

Character string. Your Pocket consumer key. Defaults to Sys.getenv("POCKET_CONSUMER_KEY").

access_token

Character string. Your Pocket request token. Defaults to Sys.getenv("POCKET_ACCESS_TOKEN").

Details

This function uses the modify endpoint of the Pocket API which exhibits some weird behaviour. For example, even if a 'modify' action is not successful, the API will still return "success". See [issue [#26](https://github.com/CorrelAid/pocketapi/issues/26) for a discussion.

Value

the response from the httr call, invisibly


CorrelAid/pocketapi documentation built on Feb. 25, 2021, 4:07 p.m.