Create annotations

Description

Create annotations

Usage

1
2
3
hs_create(token, uri, user, permissions = list(read = "group:__world__",
  update = user, delete = user, admin = user), document = NULL,
  target = NULL, tags = NULL, text, custom = NULL)

Arguments

token

Character. Your account token, which you can generate at https://hypothes.is/register

uri

Character. The URI to be annotated.

user

Character. Your user account, normally in the format acct:username@hypothes.is

permissions

A named list with read, update, delete, and admin permissions. Defaults to setting global read permissions (group:__world__) and setting the user string for update, delete, and admin permissions.

document

A list describing the document. CURRENTLY IGNORED.

target

A list describing the highlight position of the annotation. CURRENTLY IGNORED

tags

Character. (optional) Tags to apply to the annotation.

text

Character. Text to put in the body of the annotation. This will be coerced into a character vector of length 1 using paste.

custom

Add arbitrary fields to the JSON object submitted to hypothes.is by means of a named list.

Value

Upon successful creation, returns a 22-character annotation ID. This ID may be retrieved using hs_read.

Source

https://h.readthedocs.io/en/latest/api/#create

Examples

1
2
3
4
5
6
7
## Not run: 
hs_create(token = user_token,
uri = "https://github.com/mdlincoln/hypothesisr",
user = "acct:mdlincoln@hypothes.is", tags = c("testing", "R"),
text = "R made me!")

## End(Not run)