Skip to content
A ruby interface for the Mastodon API
Ruby
Branch: master
Clone or download
Pull request Compare This branch is 1 commit ahead of theoria24:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
spec
.codeclimate.yml
.gitignore
.rspec
.rubocop.yml
.travis.yml
CHANGELOG.md
Gemfile
Gemfile.lock
README.md
Rakefile
mastodon.gemspec

README.md

Mastodon API Ruby Gem

Gem Version Build Status

A ruby interface for the Mastodon API.

Installation

gem 'mastodon-api', require: 'mastodon'

Documentation

All the documentation is available on RubyDoc.

Usage

Assuming that you already have an access token for a user on a given Mastodon instance:

client = Mastodon::REST::Client.new(base_url: 'https://mastodon.social', bearer_token: 'your_access_token')

If you need to get an access token, you must first ensure that you have the client ID and client secret for your app on the given Mastodon instance (you should save those for future calls):

client.create_app('My Ruby App', 'http://mywebsite.com/callback')

You can then use the client ID and secret in a standard OAuth 2 authorization flow.

You can’t perform that action at this time.