annotation {hypothesis}R Documentation

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.

Source

https://h.readthedocs.io/en/latest/api-reference/v1/

Examples

## Not run: 
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"
)

## End(Not run)

[Package hypothesis version 1.1.0 Index]