tests/testthat/test-repo_list_records.R

with_mock_dir('t/r/listrcd', {
  test_that('`bs_list_records()` works', {
    x <- bs_list_records(
      repo = 'did:plc:wpe35pganb6d4pg4ekmfy6u5',
      collection = 'app.bsky.feed.post', auth = auth
    )
    expect_s3_class(x, 'tbl_df')
  })
})

with_mock_dir('t/r/listrcdL', {
  test_that('`bs_list_records()` works', {
    x <- bs_list_records(
      repo = 'did:plc:wpe35pganb6d4pg4ekmfy6u5',
      collection = 'app.bsky.feed.post', auth = auth, clean = FALSE
    )
    expect_equal(class(x), 'list')
  })
})

Try the bskyr package in your browser

Any scripts or data that you put into this service are public.

bskyr documentation built on June 8, 2025, 10:33 a.m.