MastoBot

I’ve started work on my # client library, #.

Initial work has progressed well; I have wrappers for HTML methods and reasonable coverage of helpers for Mastodon API endpoints.

I’ve published the WIP at https://gitlab.com/eroosenmaallen/mastobot

I’m aiming to offer three levels of API:

  • HTTP wrappers, so get, post, delete, etc., with reasonable defaults and helpers to make raw http requests comfortably
  • API endpoint wrappers, so eg. getNotifications() as a wrapper to .get('v1/notifications').
  • Feed handlers. This is where the cool happens: .processNotifications({ onMention, onFavourite }), then the callbacks will be called for objects coming back from the API. I think this will offer a really slick API for building bots

Next step should be more complete coverage of API endpoints, but I think I’m going to start on the smart API, then backfill endpoints as I go.

Very shortly I should be able to switch my multiverse bot over to this library, I’m excited to get actually using it.

Feedback is welcome, here or at Gitlab or via Mastodon. Especially if you’re interested in building a client or not, I’d love to hear your wish list and ideas.

Author: Eddie Roosenmaallen

By day I'm a senior backend engineer at Deel. 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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.