hypothesisr (version 0.1.1)

hs_search: Search hypothes.is annotations

Description

Search hypothes.is annotations.

Usage

hs_search(limit = NULL, offset = NULL, sort = "updated", order = "asc", uri = NULL, user = NULL, text = NULL, any = NULL, custom = list())

Arguments

limit
Integer. The maximum number of annotations to return. (Default: 20)
offset
Integer The minimum number of initial annotations to skip. This is used for pagination. For example if there are 65 annotations matching our search query and we're retrieving up to 30 annotations at a time, then to retrieve the last 5, set offset = 5. (Default = 0)
sort
Character. Specify which field the annotations should be sorted by: consumer, created, id, text, updated, uri, user.
order
Character. Specify which order annotations should be sorted by: asc or desc.
uri
Character. Search for annotations of a particular URI, for example www.example.com. URI searches will also find annotations of equivalent URIs. For example if the HTML document at http://www.example.com/document.html? includes a then annotations of http://www.example.com/canonical_document.html will also be included in the search results. Other forms of document equivalence that are supported include rel="alternate" links, DOIs, PDF file IDs, and more.
user
Character. Search for annotations by a particular user. For example, tim will find all annotations by users named tim at any provider, while tim@hypothes.is will only find annotations by tim on hypothes.is
text
Character. Search for annotations whose body text contains some text, for example: foobar.
any
Character. Search for annotations whose quote, tags, text, uri.parts or user fields match some query text.
custom
A named list of any field in the results returned by hypothes.is as a name, and the search text as values.

Value

A dataframe with annotation data.

Examples

Run this code
# Search for no more than 5 annotations containing the text "ulysses"
hs_search(text = "ulysses", limit = 5)
# Search with a custom field for tags
hs_search(custom = list(tags = "todo"))
# use the 'uri.parts' field to find annotations on a given domain (exclude
# the TLD, as this will result in all annotations on sites with, e.g., .org,
# as well.)
hs_search(custom = list(uri.parts = "programminghistorian"))

Run the code above in your browser using DataLab