Mastobot Beta 0.1.0-0

I’ve released an initial beta of # to .

MastoBot is a # client library for #. It offers 3 levels of helpers to communicate with a Mastodon instance.

`MastoBotHttp` is the basic helper class; it offers wrappers to make authenticated http requests, with a consistent api and return shape. It wraps Get, Post, Put, Patch, and Delete.

`MastoBotAPI` is the next level. It extends the Http library with wrapper methods for api endpoints. These methods are designed with a consistent signature, `. helperFunction(requiredParam1, requiredParam2, { optionalParams})`, and return the same result shape as the Http methods.

`MastoBot` is to be the smartest wrapper. It extends `MastoBotAPI` with more complex helper functions, eg. `postMediaStatus( status, arrayOfFiles)`. These helpers will generally return an object shape specific to the function, but I plan to include relevant http responses as part of the result.

I also plan callback-based processors for feeds, so you have eg. `processNotifications({ onMention, onFollow }) ;` and the framework will pass each result to the appropriate handler – I think that’ll be the really exciting bit for bot builders.

I’m dogfooding MastoBot with a bit of silliness at @multiverse@botsin.space. It’s currently using the MastoBotAPI methods, but I’ll integrate smart features as I implement them.

Documentation is still sorely lacking; to make the best use of MastoBot you’ll still need to make good friends with the api docs at https://docs.joinmastodon.org/client/intro/

To start using it, you can install it from npm with `npm i mastobot@beta`, and you can follow or join in on development at https://gitlab.com/eroosenmaallen/mastobot

Author: Eddie Roosenmaallen

By day I'm the Release Manager at Distributive; I help build the Distributed Compute Protocol at https://dcp.cloud. In my off time I explore Linux, JavaScript and the web, and I try to share some of my knowledge and some of my humour online.