Learn R Programming

hypothesis (version 1.1.0)

annotation: Operate with annotation

Description

Operate with annotation

Usage

annotation(
  annotation_id,
  action = c("fetch", "update", "delete", "flag", "hide", "show", "create"),
  ...,
  api_path = get_hs_host(),
  api_key = NULL
)

Arguments

annotation_id

Annotation ID

action

Action to process, Default: `fetch` Hide and show action needs moderator permissions.

...

Parameters for update annotation action, more information in hypothesis documentation

api_path

The hypothesis API path, can be specify by `hypothesis.api.api_path` option or `HYPOTHESIS_API_PATH` environment variable. Default: `https://hypothes.is/api/`.

api_key

User api key, generated on the platform.

Examples

Run this code
if (FALSE) {
annotation("annotation_id")
annotation("annotation_id", action = "update", text = "updated text")
annotation("annotation_id", action = "flag")
annotation("annotation_id", action = "hide")
annotation("annotation_id", action = "show")
annotation(
  action = "create",
  uri = "https://r-world-devs.github.io/hypothesis/articles/hypothesis-api.html",
  text = "test"
)
}

Run the code above in your browser using DataLab