Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxine-red/moostodon
A ruby interface for the Mastodon API
https://github.com/maxine-red/moostodon
mastodon mastodon-api ruby
Last synced: 3 months ago
JSON representation
A ruby interface for the Mastodon API
- Host: GitHub
- URL: https://github.com/maxine-red/moostodon
- Owner: maxine-red
- Fork: true (mastodon/mastodon-api)
- Created: 2018-08-28T08:31:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-26T22:55:26.000Z (over 5 years ago)
- Last Synced: 2024-04-14T01:16:45.232Z (8 months ago)
- Topics: mastodon, mastodon-api, ruby
- Language: Ruby
- Size: 219 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Mastodon API Ruby Gem
=====================[![Gem Version](http://img.shields.io/gem/v/moostodon.svg)][gem]
[![Build Status](http://img.shields.io/travis/maxine-red/moostodon.svg)][travis]
![Github Release Date](https://img.shields.io/github/release-date/maxine-red/moostodon.svg)[gem]: https://rubygems.org/gems/moostodon
[travis]: https://travis-ci.org/maxine-red/moostodonA ruby interface for the [Mastodon](https://github.com/tootsuite/mastodon) API.
## Installation
gem install moostodon
or
gem 'moostodon', require: 'moostodon'
## Documentation
All the documentation is available on [RubyDoc](http://www.rubydoc.info/gems/moostodon/Mastodon/REST/API).
This gem is meant as a plug-and-play replacement for [mastodon-api](https://github.com/tootsuite/mastodon-api).
## 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.
## Semantic Versioning
This project uses Semantic Versioning v2.0. This means the best to integrate it
into your project, is via pessimistic version control '~> 1.0'.