Title: | Interact with 'Bluesky' Social |
Version: | 0.3.0 |
Description: | Collect data from and make posts on 'Bluesky' Social via the Hypertext Transfer Protocol (HTTP) Application Programming Interface (API), as documented at https://atproto.com/specs/xrpc. This further supports broader queries to the Authenticated Transfer (AT) Protocol https://atproto.com/ which 'Bluesky' Social relies on. Data is returned in a tidy format and posts can be made using a simple interface. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
Imports: | cli, curl, dplyr, fs, httr2, lubridate, magick, mime, opengraph, purrr, rlang, stringi, stringr, tibble, tidyr |
Suggests: | emoji, httptest2, jsonlite, knitr, rmarkdown, spelling, testthat (≥ 3.0.0) |
URL: | https://github.com/christopherkenny/bskyr, http://christophertkenny.com/bskyr/ |
BugReports: | https://github.com/christopherkenny/bskyr/issues |
Config/testthat/edition: | 3 |
Language: | en-US |
Depends: | R (≥ 4.1.0) |
NeedsCompilation: | no |
Packaged: | 2025-05-02 21:45:18 UTC; chris |
Author: | Christopher T. Kenny
|
Maintainer: | Christopher T. Kenny <christopherkenny@fas.harvard.edu> |
Repository: | CRAN |
Date/Publication: | 2025-05-02 23:10:02 UTC |
Authenticate a user
Description
Authenticate a user
Usage
bs_auth(user, pass, save_auth = TRUE)
Arguments
user |
Character. User name to log in with. |
pass |
Character. App password to log in with. |
save_auth |
Logical. Should the authentication information be saved? If
|
Value
a list of authentication information
Lexicon references
server/createSession.json (2023-09-30)
Function introduced
v0.0.1
(2023-09-30)
Examples
bs_auth(user = get_bluesky_user(), pass = get_bluesky_pass())
Block an account
Description
Block an account
Usage
bs_block(
subject,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
subject |
Character, length 1. Subject to act on, as a handle or did. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of follow information
Lexicon references
graph/block.json (2024-12-03) repo/createRecord.json (2024-12-02)
Function introduced
v0.2.0
(2024-12-03)
Examples
bs_block(subject = 'nytimes.com')
Create a record in a repo
Description
Create a record in a repo
Usage
bs_create_record(
collection,
record,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
collection |
Character, length 1. The NSID of the record collection. |
record |
List, length 1. Description of a record. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of record information
Lexicon references
repo/createRecord.json (2023-11-25)
Function introduced
v0.1.0
(2023-11-25)
Examples
# get info about a record
post_rcd <- bs_get_record('https://bsky.app/profile/bskyr.bsky.social/post/3kf2577exva2x')
# create a record, to like the post
like <- list(
subject = list(
uri = post_rcd$uri,
cid = post_rcd$cid
),
createdAt = bs_created_at()
)
bs_create_record(collection = 'app.bsky.feed.like', record = like)
Get current time in Bluesky format
Description
Get current time in Bluesky format
Usage
bs_created_at()
Value
a length 1 character vector
Function introduced
v0.1.0
(2023-11-25)
Examples
bs_created_at()
Delete a block
Description
Delete a block
Usage
bs_delete_block(
rkey,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass)
)
bs_unblock(
rkey,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass)
)
Arguments
rkey |
Character, length 1. The CID of the version of the record. If not specified, then return the most recent version. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
Value
an httr2
status code
Lexicon references
graph/list.json (2024-12-03) repo/deleteRecord.json (2024-12-01)
Function introduced
v0.2.0
(2024-12-03)
Examples
blck <- bs_block(subject = 'nytimes.com')
bs_delete_block(bs_extract_record_key(blck$uri))
Delete a follow (un-follow someone)
Description
Delete a follow (un-follow someone)
Usage
bs_delete_follow(
rkey,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass)
)
bs_unfollow(
rkey,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass)
)
Arguments
rkey |
Character, length 1. The CID of the version of the record. If not specified, then return the most recent version. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
Value
an httr2
status code
Lexicon references
graph/list.json (2024-12-03) repo/deleteRecord.json (2024-12-01)
Function introduced
v0.2.0
(2024-12-03)
Examples
foll <- bs_follow(subject = 'chriskenny.bsky.social')
bs_delete_follow(bs_extract_record_key(foll$uri))
# obviously, you deleted this by mistake and want to follow me
foll <- bs_follow(subject = 'chriskenny.bsky.social')
Delete a like (un-like something)
Description
Delete a like (un-like something)
Usage
bs_delete_like(
rkey,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass)
)
bs_unlike(
rkey,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass)
)
Arguments
rkey |
Character, length 1. The CID of the version of the record. If not specified, then return the most recent version. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
Value
an httr2
status code
Lexicon references
graph/list.json (2024-12-03) repo/deleteRecord.json (2024-12-01)
Function introduced
v0.2.0
(2024-12-03)
Examples
like <- bs_like(post = 'https://bsky.app/profile/bskyr.bsky.social/post/3kf2577exva2x')
bs_delete_like(bs_extract_record_key(like$uri))
Delete a list
Description
Delete a list
Usage
bs_delete_list(
rkey,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass)
)
Arguments
rkey |
Character, length 1. The CID of the version of the record. If not specified, then return the most recent version. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
Value
an httr2
status code
Lexicon references
graph/list.json (2024-12-01) repo/deleteRecord.json (2024-12-01)
Function introduced
v0.2.0
(2024-12-01)
Examples
lst <- bs_new_list(name = 'test list bskyr', purpose = 'curatelist')
bs_delete_list(bs_extract_record_key(lst$uri))
Delete a list item
Description
Delete a list item
Usage
bs_delete_list_item(
rkey,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass)
)
Arguments
rkey |
Character, length 1. The CID of the version of the record. If not specified, then return the most recent version. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
Value
an httr2
status code
Lexicon references
graph/listitem.json (2024-12-01) repo/deleteRecord.json (2024-12-01)
Function introduced
v0.2.0
(2024-12-01)
Examples
lst <- bs_new_list(name = 'test list bskyr', purpose = 'curatelist')
itm <- bs_new_list_item(subject = 'bskyr.bsky.social', uri = lst$uri)
bs_delete_list_item(bs_extract_record_key(itm$uri))
bs_delete_list(bs_extract_record_key(lst$uri))
Delete a post
Description
Delete a post
Usage
bs_delete_post(
rkey,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass)
)
Arguments
rkey |
Character, length 1. The CID of the version of the record. If not specified, then return the most recent version. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
Value
an httr2
status code
Lexicon references
feed/post.json (2025-03-20) repo/deleteRecord.json (2025-03-20)
Function introduced
v0.3.0
(2025-03-20)
Examples
pst <- bs_post('a test post to be deleted')
bs_delete_post(bs_extract_record_key(pst$uri))
Delete a record in a repo
Description
Delete a record in a repo
Usage
bs_delete_record(
collection,
rkey,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass)
)
Arguments
collection |
Character, length 1. The NSID of the record collection. |
rkey |
Character, length 1. The CID of the version of the record. If not specified, then return the most recent version. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
Value
an httr2
status code
Lexicon references
repo/deleteRecord.json (2023-11-25)
Function introduced
v0.1.0
(2023-11-25)
Examples
# get info about a record
post_rcd <- bs_get_record('https://bsky.app/profile/bskyr.bsky.social/post/3kf2577exva2x')
# create a record, to like the post
like <- list(
subject = list(
uri = post_rcd$uri,
cid = post_rcd$cid
),
createdAt = bs_created_at()
)
rec <- bs_create_record(collection = 'app.bsky.feed.like', record = like)
bs_delete_record(
collection = 'app.bsky.feed.like',
rkey = bs_extract_record_key(rec$uri)
)
Delete a repost
Description
Delete a repost
Usage
bs_delete_repost(
rkey,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass)
)
Arguments
rkey |
Character, length 1. The CID of the version of the record. If not specified, then return the most recent version. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
Value
an httr2
status code
Lexicon references
feed/repost.json (2023-11-25) repo/deleteRecord.json (2024-12-01)
Function introduced
v0.2.0
(2024-12-03)
Examples
repo <- bs_repost('https://bsky.app/profile/bskyr.bsky.social/post/3kf2577exva2x')
bs_delete_repost(bs_extract_record_key(repo$uri))
Delete a starter pack
Description
Delete a starter pack
Usage
bs_delete_starter_pack(
rkey,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass)
)
Arguments
rkey |
Character, length 1. The CID of the version of the record. If not specified, then return the most recent version. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
Value
an httr2
status code
Lexicon references
graph/starterpack.json (2024-12-04) repo/deleteRecord.json (2024-12-01)
Function introduced
v0.2.0
(2024-12-04)
Examples
starter <- bs_new_starter_pack('bskyr test')
bs_delete_starter_pack(bs_extract_record_key(starter$uri))
Describe a repo
Description
Describe a repo
Usage
bs_describe_repo(
repo,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
repo |
Character, length 1. The handle or DID of the repo. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of record information
Lexicon references
repo/describeRepo.json (2023-11-25)
Function introduced
v0.1.0
(2023-11-25)
Examples
bs_describe_repo('chriskenny.bsky.social')
Extract Record Key from a link
Description
Extract Record Key from a link
Usage
bs_extract_record_key(url)
Arguments
url |
Character, length 1. URL for record to get. |
Value
character vector of record keys
Examples
bs_extract_record_key('https://bsky.app/profile/chriskenny.bsky.social/post/3lc5d6zspys2c')
Follow an account
Description
Follow an account
Usage
bs_follow(
subject,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
subject |
Character, length 1. Subject to act on, as a handle or did. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of follow information
Lexicon references
graph/list.json (2024-12-02) repo/createRecord.json (2024-12-02)
Function introduced
v0.2.0
(2024-12-02)
Examples
bs_follow(subject = 'chriskenny.bsky.social')
Get a list of lists that belong to an actor.
Description
Get a list of lists that belong to an actor.
Usage
bs_get_actor_lists(
actor,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
actor |
Character, length 1. name of 1 actor, such as |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of lists
Lexicon references
graph/getLists.json (2023-10-02)
Function introduced
v0.0.1
(2023-10-02)
Examples
bs_get_actor_lists('profmusgrave.bsky.social')
bs_get_actor_lists('chriskenny.bsky.social')
bs_get_actor_lists('pfrazee.com')
Get starter packs created by an actor
Description
Get starter packs created by an actor
Usage
bs_get_actor_starter_packs(
actor,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
actor |
Character, length 1. name of 1 actor, such as |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of starter packs
Lexicon references
graph/getActorStarterPacks.json (2024-11-20)
Function introduced
v0.2.0
(2024-11-20)
Examples
bs_get_actor_starter_packs('chriskenny.bsky.social')
bs_get_actor_starter_packs('pfrazee.com')
Get a list of actors suggested for following
Description
Get a list of actors suggested for following
Usage
bs_get_actor_suggestions(
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of suggested accounts to follow
Lexicon references
actor/getSuggestions.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-01)
Examples
bs_get_actor_suggestions()
Retrieve posts on an actor's feed
Description
Retrieve posts on an actor's feed
Usage
bs_get_author_feed(
actor,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
actor |
Character, length 1. name of 1 actor, such as |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of posts
Lexicon references
feed/getAuthorFeed.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-01)
Examples
bs_get_author_feed('chriskenny.bsky.social')
Retrieve a user's (self) muted lists
Description
Retrieve a user's (self) muted lists
Usage
bs_get_blocked_lists(
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Maximum number to request. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of actors
Lexicon references
graph/getListMutes.json (2023-10-02)
Function introduced
v0.0.1
(2023-10-02)
Examples
bs_get_blocked_lists()
Retrieve user (self) blocks
Description
Retrieve user (self) blocks
Usage
bs_get_blocks(
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of blocked accounts
Lexicon references
graph/getBlocks.json (2023-10-02)
Function introduced
v0.0.1
(2023-10-02)
Examples
bs_get_blocks()
Build feed from user's feed generator
Description
Build feed from user's feed generator
Usage
bs_get_feed(
feed,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
feed |
Character, length 1. Feed to get. |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of posts
Lexicon references
feed/getFeed.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-01)
Examples
bs_get_feed('at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/bsky-team')
Get specific information about one feed generator
Description
Get specific information about one feed generator
Usage
bs_get_feed_generator(
feed,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
feed |
Character, length 1. Feed to get. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of feeds
Lexicon references
feed/getFeedGenerator.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-01)
See Also
bs_get_feed_generators()
for less detailed information about multiple feed generators.
Examples
bs_get_feed_generator('at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/bsky-team')
Get information about a list of feed generators
Description
Get information about a list of feed generators
Usage
bs_get_feed_generators(
feeds,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
feeds |
Character. Vector of feeds to get. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of feeds
Lexicon references
feed/getFeedGenerators.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-01)
See Also
bs_get_feed_generators()
for more detailed information about one feed generator.
Examples
bs_get_feed_generators('at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/bsky-team')
bs_get_feed_generators(c(
'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/bsky-team',
'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot'
))
Get a list of feed suggestions
Description
Get a list of feed suggestions
Usage
bs_get_feed_suggestions(
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of suggested feeds
Lexicon references
feed/getSuggestedFeeds.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-02)
Examples
bs_get_feed_suggestions()
Retrieve a list of feeds created by a given actor
Description
Retrieve a list of feeds created by a given actor
Usage
bs_get_feeds(
actor,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
actor |
Character, length 1. name of 1 actor, such as |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of feeds
Lexicon references
feed/getActorFeeds.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-01)
Examples
bs_get_feeds('chriskenny.bsky.social')
Get suggested follows related to a given actor
Description
Get suggested follows related to a given actor
Usage
bs_get_follow_suggestions(
actor,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
actor |
Character, length 1. name of 1 actor, such as |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of actors
Lexicon references
graph/getSuggestedFollowsByActor.json (2023-10-02)
Function introduced
v0.0.1
(2023-10-02)
Examples
bs_get_follow_suggestions('chriskenny.bsky.social')
Retrieve an actor's followers
Description
Retrieve an actor's followers
Usage
bs_get_followers(
actor,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
actor |
Character, length 1. name of 1 actor, such as |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of actors
Lexicon references
graph/getFollowers.json (2023-10-02)
Function introduced
v0.0.1
(2023-10-02)
Examples
bs_get_followers('chriskenny.bsky.social')
Retrieve an actor's follows
Description
Retrieve an actor's follows
Usage
bs_get_follows(
actor,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
actor |
Character, length 1. name of 1 actor, such as |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of actors
Lexicon references
graph/getFollows.json (2023-10-02)
Function introduced
v0.0.1
(2023-10-02)
Examples
bs_get_follows('chriskenny.bsky.social')
Retrieve posts liked by an actor
Description
Retrieve posts liked by an actor
Usage
bs_get_likes(
actor,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
actor |
Character, length 1. name of 1 actor, such as |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of likes
Lexicon references
feed/getActorLikes.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-01)
Examples
bs_get_likes('chriskenny.bsky.social')
Get a view of a list
Description
Get a view of a list
Usage
bs_get_list(
list,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
list |
Character vector, length 1. Reference of the list record to get. |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of lists
Lexicon references
graph/getList.json (2025-03-20)
Function introduced
v0.2.0
(2024-11-25)
Examples
bs_get_list('at://did:plc:ragtjsm2j2vknwkz3zp4oxrd/app.bsky.graph.list/3kmokjyuflk2g')
bs_get_list('at://did:plc:hgyzg2hn6zxpqokmp5c2xrdo/app.bsky.graph.list/3laygnmmcfc2x')
Retrieve recent posts from actors in a list
Description
Retrieve recent posts from actors in a list
Usage
bs_get_list_feed(
list,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
list |
Character vector, length 1. Reference of the list record to get. |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of likes
Lexicon references
feed/getListFeed.json (2025-03-20)
Function introduced
v0.3.0
(2025-03-20)
Examples
bs_get_list_feed('at://did:plc:ragtjsm2j2vknwkz3zp4oxrd/app.bsky.graph.list/3kmokjyuflk2g')
Retrieve a user's (self) muted lists
Description
Retrieve a user's (self) muted lists
Usage
bs_get_muted_lists(
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of actors
Lexicon references
graph/getListMutes.json (2023-10-02)
Function introduced
v0.0.1
(2023-10-02)
Examples
bs_get_muted_lists()
Retrieve a user's (self) muted accounts
Description
Retrieve a user's (self) muted accounts
Usage
bs_get_mutes(
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of actors
Lexicon references
graph/getMutes.json (2023-10-02)
Function introduced
v0.0.1
(2023-10-02)
Examples
bs_get_mutes()
Get the user's (self) number of unread notifications
Description
Get the user's (self) number of unread notifications
Usage
bs_get_notification_count(
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble with a single column and row for the count
Lexicon references
notification/getUnreadCount.json (2023-10-02)
Function introduced
v0.0.1
(2023-10-02)
Examples
bs_get_notification_count()
Get the user's (self) notifications
Description
Get the user's (self) notifications
Usage
bs_get_notifications(
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble with notifications
Lexicon references
notification/listNotifications.json (2023-10-02)
Function introduced
v0.0.1
(2023-10-02)
Examples
bs_get_notifications()
Retrieve likes on a post
Description
Retrieve likes on a post
Usage
bs_get_post_likes(
uri,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
uri |
Character, length 1. URI for post to get. |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of likes
Lexicon references
feed/getLikes.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-01)
Examples
bs_get_post_likes('at://did:plc:ic6zqvuw5ulmfpjiwnhsr2ns/app.bsky.feed.post/3k7qmjev5lr2s')
Retrieve thread of posts
Description
Retrieve thread of posts
Usage
bs_get_post_thread(
uri,
depth = NULL,
parent_height = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
uri |
Character, length 1. URI for post to get. |
depth |
Integer. Maximum depth to request. Maximum: |
parent_height |
Integer. Maximum parent height to request. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of posts
Lexicon references
feed/getPostThread.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-01)
Examples
bs_get_post_thread('at://did:plc:ic6zqvuw5ulmfpjiwnhsr2ns/app.bsky.feed.post/3k7qmjev5lr2s')
Retrieve thread of posts
Description
Retrieve thread of posts
Usage
bs_get_posts(
uris,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
uris |
Character. Vector of URIs for posts to get. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of posts
Lexicon references
feed/getPosts.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-01)
Examples
bs_get_posts('at://did:plc:ic6zqvuw5ulmfpjiwnhsr2ns/app.bsky.feed.post/3k7qmjev5lr2s')
bs_get_posts('https://bsky.app/profile/chriskenny.bsky.social/post/3lc5d6zspys2c')
Get (Self) Preferences
Description
Get (Self) Preferences
Usage
bs_get_preferences(
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of preferences
Lexicon references
actor/getPreferences.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-01)
Examples
bs_get_preferences()
Get Profile for a Bluesky Social User
Description
Get Profile for a Bluesky Social User
Usage
bs_get_profile(
actors,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
actors |
character vector of actor(s), such as |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble with a row for each actor
Lexicon references
actor/getProfiles.json (2023-10-01) actor/getProfile.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-01)
Examples
bs_get_profile('chriskenny.bsky.social')
bs_get_profile(actors = c('chriskenny.bsky.social', 'simko.bsky.social'))
Retrieve a list of quotes for a given post
Description
Retrieve a list of quotes for a given post
Usage
bs_get_quotes(
uri,
cid,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
uri |
Character, length 1. URI for post to get. |
cid |
Optional, character. Filters to quotes of specific version (by CID) of the post record |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of quote posts
Lexicon references
feed/getQuotes.json (2024-12-01)
Function introduced
v0.2.0
(2024-12-01)
Examples
bs_get_quotes('at://did:plc:5c2r73erhng4bszmxlfdtscf/app.bsky.feed.post/3lc5c5qv72r2w')
Get an arbitrary record from a repo
Description
Get an arbitrary record from a repo
Usage
bs_get_record(
repo = NULL,
collection = NULL,
rkey = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
repo |
Character, length 1. The handle or DID of the repo. |
collection |
Character, length 1. The NSID of the record collection. |
rkey |
Character, length 1. The CID of the version of the record. If not specified, then return the most recent version. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of upload blob information
Lexicon references
repo/getRecord.json (2023-11-24)
Function introduced
v0.1.0
(2023-11-24)
Examples
bs_get_record('https://bsky.app/profile/bskyr.bsky.social/post/3kf2577exva2x')
Get relationships between an account and other users
Description
Get relationships between an account and other users
Usage
bs_get_relationships(
actor,
others,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
actor |
Character, length 1. name of 1 actor, such as |
others |
Optional, character vector of other users to look up relationships |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of relationships
Lexicon references
graph/getRelationships.json (2024-12-01)
Function introduced
v0.2.0
(2024-12-01)
Examples
bs_get_relationships('chriskenny.bsky.social', 'bskyr.bsky.social')
Retrieve actors who reposted a post
Description
Retrieve actors who reposted a post
Usage
bs_get_reposts(
uri,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
uri |
Character, length 1. URI for post to get. |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of actors
Lexicon references
feed/getRepostedBy.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-02)
Examples
bs_get_reposts('at://did:plc:ic6zqvuw5ulmfpjiwnhsr2ns/app.bsky.feed.post/3kaa2gxjhzr2a')
Get information on one starter pack
Description
Get information on one starter pack
Usage
bs_get_starter_pack(
starter_pack,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
starter_pack |
Character vector, length 1. URI of starter pack to get. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of starter packs
Lexicon references
graph/getStarterPack.json (2024-11-20)
Function introduced
v0.2.0
(2024-11-20)
Examples
bs_get_starter_pack(
'at://did:plc:wpe35pganb6d4pg4ekmfy6u5/app.bsky.graph.starterpack/3lb3g5veo2z2r'
)
Get information about a list of starter packs
Description
Get information about a list of starter packs
Usage
bs_get_starter_packs(
starter_packs,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
starter_packs |
Character vector. Vector of URIs of starter packs to get. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of starter packs
Lexicon references
graph/getStarterPacks.json (2024-11-20)
Function introduced
v0.2.0
(2024-11-20)
Examples
bs_get_starter_packs(
'at://did:plc:wpe35pganb6d4pg4ekmfy6u5/app.bsky.graph.starterpack/3lb3g5veo2z2r'
)
bs_get_starter_packs(
c('at://did:plc:wpe35pganb6d4pg4ekmfy6u5/app.bsky.graph.starterpack/3lb3g5veo2z2r',
'at://did:plc:bmc56x6ksb7o7sdkq2fgm7se/app.bsky.graph.starterpack/3laywns2q2v27')
)
Retrieve the user's home timeline
Description
Retrieve the user's home timeline
Usage
bs_get_timeline(
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of posts
Lexicon references
feed/getTimeline.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-02)
Examples
bs_get_timeline()
Like an existing post
Description
Like an existing post
Usage
bs_like(
post,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
post |
Character vector, length 1. Link to a post. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of post information
Lexicon references
feed/like.json (2023-11-25) repo/createRecord.json (2023-11-25)
Function introduced
v0.1.0
(2023-11-25)
Examples
bs_like(post = 'https://bsky.app/profile/bskyr.bsky.social/post/3kf2577exva2x')
List records in a repo
Description
List records in a repo
Usage
bs_list_records(
repo,
collection,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
repo |
Character, length 1. The handle or DID of the repo. |
collection |
Character, length 1. The NSID of the record collection. |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of record information
Lexicon references
repo/createRecord.json (2023-11-25)
Function introduced
v0.1.0
(2023-11-25)
Examples
bs_list_records(repo = 'chriskenny.bsky.social', collection = 'app.bsky.feed.post')
Embed external media in a post
Description
Embeds are not designed as standalone records, but rather as part of a post. This will create a list representation of an external embed.
Usage
bs_new_embed_external(
uri,
title,
description,
thumb,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass)
)
Arguments
uri |
a link to embed |
title |
the title for the link |
description |
a description of the link |
thumb |
Optional. A thumbnail for the link |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
Value
a list representation of an external embed
Lexicon references
embed/external.json (2024-12-05)
Function introduced
v0.2.0
(2024-12-05)
Examples
bs_new_embed_external(
uri = 'https://christophertkenny.com/bskyr/',
title = 'Interact with Bluesky Social',
description = 'An R package for using Bluesky Social'
)
bs_new_embed_external(
uri = 'https://christophertkenny.com/bskyr/'
)
Create a list
Description
Create a list
Usage
bs_new_list(
name,
purpose,
description,
avatar,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
name |
Character. Display name for list. |
purpose |
Purpose of the list. One of |
description |
Optional character. Description of the list. |
avatar |
Optional character. Path to image to use as avatar. PNG or JPEG recommended. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of list information
Lexicon references
graph/list.json (2024-12-01) graph/defs.json (2024-12-01) repo/createRecord.json (2023-11-25)
Function introduced
v0.2.0
(2024-12-01)
Examples
bs_new_list(name = 'test list bskyr', purpose = 'curatelist')
bs_new_list(name = 'test list bskyr w avatar',
description = 'to be deleted, just for testing bskyr',
avatar = fs::path_package('bskyr', 'man/figures/logo.png'),
purpose = 'curatelist')
Add a subject to a list
Description
Add a subject to a list
Usage
bs_new_list_item(
subject,
uri,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
subject |
Character, length 1. Subject to act on, as a handle or did. |
uri |
Character, length 1. URI of the list to add the subject to. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of list item information
Lexicon references
graph/listitem.json (2024-12-01) repo/createRecord.json (2023-11-25)
Function introduced
v0.2.0
(2024-12-01)
Examples
lst <- bs_new_list(name = 'test list listitem bskyr', purpose = 'curatelist')
bs_new_list_item(subject = 'chriskenny.bsky.social', uri = lst$uri)
# see the list item
bs_get_list(lst$uri)
Create a new starter pack
Description
Create a new starter pack
Usage
bs_new_starter_pack(
name,
list,
description,
feeds,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
name |
Character. Display name for starter pack |
list |
Character. List to base the starter pack on. If not provided, a new list will be created. |
description |
Optional character. Description of the list. |
feeds |
Optional character. List of feed items to include in starter pack. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of post information
Lexicon references
graph/starterpack.json (2024-12-04) repo/createRecord.json (2023-11-25)
Function introduced
v0.2.0
(2024-12-04)
Examples
bs_new_starter_pack('bskyr test')
Make a post on Bluesky Social
Description
Make a post on Bluesky Social
Usage
bs_post(
text,
images,
images_alt,
video,
video_alt,
langs,
reply,
quote,
embed = TRUE,
emoji = TRUE,
max_tries,
created_at = bs_created_at(),
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
text |
Text of post |
images |
Character vector of paths to images to attach to post |
images_alt |
Character vector of alt text for images. Must be same length as |
video |
Character vector of path for up to one video to attach to post |
video_alt |
Character vector, length one, of alt text for video, if used. |
langs |
Character vector of languages in BCP-47 format |
reply |
Character vector with link to the parent post to reply to |
quote |
Character vector with link to a post to quote |
embed |
Logical. Default is |
emoji |
Logical. Default is |
max_tries |
Integer, >= 2. Number of times to retry the request if the first fails. |
created_at |
Character, length 1 of the form "%Y-%m-%dT%H:%M:%OS6Z". Time to assign to a record. Default is |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of post information
Emoji parsing
:emoji:
parsing is not a formally supported Bluesky feature. This package
converts usages of this kind by identifying text within :
s, here "emoji
"
and then matches them to the emoji
package's list of emoji names. All
supported emoji names and corresponding images can be seen with
emoji::emoji_name
. This feature was introduced in v0.2.0
.
Embedding
Embedding is a feature that allows for a link card to be created when a URL
or other media to be added as a preview to the post. This feature was
introduced in v0.2.0
.
Embeds are processed as follows:
If
is.list(embed)
, it is assumed to be an embed object. These should be created withbs_new_embed_external()
, unless you are certain of the structure.If
is.character(embed)
, it is assumed to be a URL. The function will use the open graph protocol to try to infer the embed from the URL.If
isTRUE(embed)
, the default, it tries to infer the embed from the text.First, if a Tenor Gif link is found in the text, it will be embedded.
Second, if a URL is found in the text, it will be embedded. Only the first URL found will be embedded.
If
isFALSE(embed)
or it does match an earlier condidtion, no embed is created and the post is sent as is.
Lexicon references
feed/post.json (2024-11-29) repo/createRecord.json (2023-10-02)
Function introduced
v0.0.1
(2023-10-02)
Examples
bs_post('Test post from R CMD Check for r package `bskyr`
via @bskyr.bsky.social (https://christophertkenny.com/bskyr/)')
bs_post('Test self-reply from r package `bskyr`
via @bskyr.bsky.social (https://christophertkenny.com/bskyr/)',
reply = 'https://bsky.app/profile/bskyr.bsky.social/post/3kexwuoyqj32g'
)
bs_post('Test quoting from r package `bskyr`
via @bskyr.bsky.social (https://christophertkenny.com/bskyr/)',
quote = 'https://bsky.app/profile/bskyr.bsky.social/post/3kf24wd6cmb2a'
)
bs_post('Test quote and reply from r package `bskyr`
via @bskyr.bsky.social (https://christophertkenny.com/bskyr/)',
reply = 'https://bsky.app/profile/bskyr.bsky.social/post/3kexwuoyqj32g',
quote = 'https://bsky.app/profile/bskyr.bsky.social/post/3kf24wd6cmb2a'
)
bs_post('Test quote with :emoji: and :fire: and :confetti_ball: from r package
`bskyr` via @bskyr.bsky.social (https://christophertkenny.com/bskyr/)')
bs_post(text = 'Testing images and aspect ratios from R',
images = fs::path_package('bskyr', 'man/figures/logo.png'),
images_alt = 'hexagonal logo of the R package bskyr, with the text "bskyr" on a cloud')
bs_post(text = 'testing sending videos from R',
video = fs::path_package('bskyr', 'man/figures/pkgs.mp4'),
video_alt = 'a carousel of package logos, all hexagonal')
Repost an existing post
Description
Repost an existing post
Usage
bs_repost(
post,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
post |
Character vector, length 1. Link to a post. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of post information
Lexicon references
feed/repost.json (2023-11-25) repo/createRecord.json (2023-11-25)
Function introduced
v0.1.0
(2023-11-25)
Examples
bs_repost('https://bsky.app/profile/bskyr.bsky.social/post/3kf2577exva2x')
Resolve a Handle to Decentralized Identifier (DID)
Description
Resolve a Handle to Decentralized Identifier (DID)
Usage
bs_resolve_handle(
handle,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
handle |
Character, length 1. Handle, such as |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of decentralized identifier
Lexicon references
identity/resolveHandle.json (2023-11-24)
Function introduced
v0.1.0
(2023-11-24)
Examples
bs_resolve_handle('chriskenny.bsky.social')
Find profiles matching search criteria
Description
Find profiles matching search criteria
Usage
bs_search_actors(
query,
typeahead = FALSE,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
query |
character. search query, Lucene query syntax is recommended when |
typeahead |
logical. Use typeahead for search? Default is |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of suggested accounts to follow
Lexicon references
actor/searchActors.json (2023-10-01) actor/searchActorsTypeahead.json (2023-10-01)
Function introduced
v0.0.1
(2023-10-01)
Examples
bs_search_actors('political science')
Find posts matching search criteria
Description
Find posts matching search criteria
Usage
bs_search_posts(
query,
sort = NULL,
since = NULL,
until = NULL,
mentions = NULL,
author = NULL,
lang = NULL,
domain = NULL,
url = NULL,
tag = NULL,
cursor = NULL,
limit = NULL,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
query |
Character vector, length 1. character. Search query, Lucene query syntax is recommended. |
sort |
character. Order or results. Either |
since |
character. Filter results for posts on or after the indicated datetime or ISO date (YYYY-MM-DD). |
until |
character. Filter results for posts before the indicated datetime or ISO date (YYYY-MM-DD). |
mentions |
character. Filter to posts which mention the given account. |
author |
character. Filter to posts by the given account. |
lang |
character. Filter to posts in the given language. |
domain |
character. Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. |
url |
character. Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. |
tag |
character. Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. |
cursor |
Character, length 1. A cursor property from a prior response. Default: |
limit |
Integer. Number of records to request. If over |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of suggested accounts to follow
Lexicon references
feed/searchPosts.json (2024-11-25)
Function introduced
v0.1.1
(2023-12-13)
Examples
bs_search_posts('redistricting')
bs_search_posts('ggplot2', tag = 'rstats', sort = 'latest')
Upload a blob to a repo
Description
Upload a blob to a repo
Usage
bs_upload_blob(
blob,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass),
clean = TRUE
)
Arguments
blob |
Character, files to upload to a repo. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
clean |
Logical. Should output be cleaned into a |
Value
a tibble::tibble of upload blob information
Lexicon references
repo/uploadBlob.json (2023-11-24)
Function introduced
v0.1.0
(2023-11-24)
Examples
fig <- fs::path_package('bskyr', 'man/figures/logo.png')
bs_upload_blob(fig)
Convert Universal Resource Identifiers to Hypertext Transfer Protocol Secure URLs
Description
Convert Universal Resource Identifiers to Hypertext Transfer Protocol Secure URLs
Usage
bs_uri_to_url(uri)
Arguments
uri |
Character, length 1. URI for post to get. |
Value
character vector of HTTPS URLs
Function introduced
v0.1.0
(2023-11-24)
Examples
bs_uri_to_url('at://did:plc:ic6zqvuw5ulmfpjiwnhsr2ns/app.bsky.feed.post/3k7qmjev5lr2s')
Convert Hypertext Transfer Protocol Secure URLs to Universal Resource Identifiers
Description
Convert Hypertext Transfer Protocol Secure URLs to Universal Resource Identifiers
Usage
bs_url_to_uri(
url,
user = get_bluesky_user(),
pass = get_bluesky_pass(),
auth = bs_auth(user, pass)
)
Arguments
url |
Character, length 1. URL for record to get. |
user |
Character. User name to log in with. Defaults to |
pass |
Character. App password to log in with. Defaults to |
auth |
Authentication information. Defaults to |
Value
character vector of URIs
Function introduced
v0.2.0
(2024-11-30)
Examples
bs_url_to_uri('https://bsky.app/profile/chriskenny.bsky.social/post/3lc5d6zspys2c')
Check or Get Bluesky App Password
Description
Check or Get Bluesky App Password
Usage
has_bluesky_pass()
get_bluesky_pass()
bs_get_pass()
bs_has_pass()
Value
logical if has
, pass if get
Examples
has_bluesky_pass()
Add Entry to Renviron
Description
Adds Bluesky App Password to .Renviron.
Usage
set_bluesky_pass(pass, overwrite = FALSE, install = FALSE, r_env = NULL)
bs_set_pass(pass, overwrite = FALSE, install = FALSE, r_env = NULL)
Arguments
pass |
Character. App Password to add to add. |
overwrite |
Defaults to FALSE. Boolean. Should existing |
install |
Defaults to FALSE. Boolean. Should this be added '~/.Renviron' file? |
r_env |
Path to install to if |
Value
pass, invisibly
Examples
example_env <- tempfile(fileext = '.Renviron')
set_bluesky_pass('1234-1234-1234-1234', r_env = example_env)
# r_env should likely be: file.path(Sys.getenv('HOME'), '.Renviron')
Adds Bluesky User to .Renviron.
Description
Adds Bluesky User to .Renviron.
Usage
set_bluesky_user(user, overwrite = FALSE, install = FALSE, r_env = NULL)
bs_set_user(user, overwrite = FALSE, install = FALSE, r_env = NULL)
Arguments
user |
Character. User to add to add. |
overwrite |
Defaults to FALSE. Boolean. Should existing |
install |
Defaults to FALSE. Boolean. Should this be added '~/.Renviron' file? |
r_env |
Path to install to if |
Value
user, invisibly
Examples
example_env <- tempfile(fileext = '.Renviron')
set_bluesky_user('CRAN_EXAMPLE.bsky.social', r_env = example_env)
# r_env should likely be: file.path(Sys.getenv('HOME'), '.Renviron')
Check or Get Bluesky User
Description
Check or Get Bluesky User
Usage
has_bluesky_user()
get_bluesky_user()
bs_get_user()
bs_has_user()
Value
logical if has
, user if get
Examples
has_bluesky_user()