Skip to content
Shreyan Jain edited this page Apr 23, 2023 · 2 revisions

bskyrb

bskyrb is a Ruby gem for interacting with the BlueSky/ATProto API.

Features

  • Create sessions with a username and password, and perform authenticated requests to the PDS server.
  • Resolve handles to retrieve DIDs (Decentralized Identifiers) of users.
  • Create records (posts, follows) and upload blobs to your ATProto repo. (Note that uploading blobs is kinda useless rn)
  • Retrieve posts from user feeds, timelines, and specific post threads.

Installation

Add this line to your application's Gemfile:

gem 'bskyrb'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install bskyrb

Usage

To create a new session with a username, password, and PDS URL:

require 'bskyrb'

username = 'your_username'
password = 'your_password'
pds_url = 'https://your_pds_url.com'

credentials = Bskyrb::Credentials.new(username, password)
session = Bskyrb::Session.new(credentials, pds_url)
records = Bskyrb::RecordManager.new(session)

Once you have a RecordManager object, you can use it to create posts, follow users, etc.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ShreyanJain9/bskyrb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Clone this wiki locally