search_post {atrrr}R Documentation

Search Posts

Description

Search Posts

Usage

search_post(q, limit = 100L, parse = TRUE, verbose = NULL, .token = NULL)

search_skeet(q, limit = 100L, parse = TRUE, verbose = NULL, .token = NULL)

Arguments

q

search query. See Details.

limit

Maximum number of records to return. For queries with more than 100 results, pagination is used automatically (one request per 100 results). The function stops when the limit is reached, but you will usually get a few items more than requested.

parse

Parse the results or return the original nested object sent by the server.

verbose

Whether to print status messages to the Console (TRUE/FALSE). Package default (when NULL) is to have status messages. Can be changed with Sys.setenv(ATR_VERBOSE = FALSE).

.token

If you manage your own tokens, you can supply it here. Usually NULL is OK and will automatically load or guide you to generate a token.

Details

The API docs claim that Lucene query syntax is supported (Boolean operators and brackets for complex queries). But only a small subset is actually implemented:

Note that matches can occur anywhere in the skeet, not just the text. For example, a term can be in the link preview, or alt text of an image.

Value

a data frame (or nested list) of posts

Examples

## Not run: 
search_post("rstats")
# finds post with the hashtag rstats AND the word Bluesky somewhere in the
# skeet (ignoring capitalisaion)
search_post("#rstats Bluesky")

# search for the exact phrase "new #rstats package"
search_post("\"new #rstats package\"")
# Use single quotes so you do not need to escape double quotes
search_post('"new #rstats package"')

# only search for skeets from one user
search_post("from:jbgruber.bsky.social #rstats")

## End(Not run)

[Package atrrr version 0.0.3 Index]