Giter Site home page Giter Site logo

atproto-ruby's Introduction

atproto-ruby

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.

Description

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.

Installation

Add this line to your application's Gemfile:

gem 'atproto'

And then execute:

bundle install

Or install it yourself as:

gem install atproto

Usage

Basic Login

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

Token Refresh

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.

Contributing

Contributions are welcome and greatly appreciated! Here are some ways you can contribute:

  • Reporting bugs
  • Suggesting enhancements
  • Submitting pull requests

License

This project is licensed under the MIT License.

Acknowledgments

  • AT Protocol and Bluesky community for providing the specifications and documentation.

atproto-ruby's People

Watchers

Teal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.