A Ruby library for interacting with the AT Protocol, providing easy-to-use methods for authentication and API requests to Bluesky's ATProto-based services.
This library simplifies the process of integrating ATProto authentication and API interactions into Ruby and Ruby on Rails applications. It provides a straightforward interface for logging in, refreshing tokens, and (in the future) performing other actions supported by the AT Protocol.
Add this line to your application's Gemfile:
gem 'atproto'
And then execute:
bundle install
Or install it yourself as:
gem install atproto
require 'atproto'
client = ATProto::Client.new("https://bsky.social")
if client.login("your_username", "your_app_password")
puts "Login successful!"
# Perform actions after successful login
else
puts "Login failed."
end
if client.refresh_session
puts "Token refreshed!"
# Use the refreshed token for subsequent API calls
else
puts "Failed to refresh token."
end
Replace "your_username"
and "your_app_password"
with the actual username and app password.
Contributions are welcome and greatly appreciated! Here are some ways you can contribute:
- Reporting bugs
- Suggesting enhancements
- Submitting pull requests
This project is licensed under the MIT License.
- AT Protocol and Bluesky community for providing the specifications and documentation.