pocketapi (version 0.1)

pocket_add: pocket_add

Description

Add one or more items to your Pocket account.

Usage

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").

Value

the response from the httr call, invisibly

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.