Build high-quality Fediverse client apps, together.

teropong is a new, open-source Fediverse API client to let developers integrate their Fediverse apps with Mastodon, Misskey, Pleroma, and more without having to hack around and reimplement support for each of them from scratch.

teropong is currently an alpha-quality software, expect some rapid changes as we continue to stabilize our client specification.




Features

Most Fediverse client libraries focus themselves on mirroring API endpoints into their methods/functions. For example, Mastodon API clients try to match their function or method names, input parameters, as well as defining structs and objects as close as possible to the official Mastodon REST API documentation.

teropong, however, is built different. Instead of mirroring those servers' REST API, we decided to focus on what an object like Post or Account could do by using good-old, "plain old Java objects" (POJO) with excessive inheritance.

⛓️ Excessive Inheritance

class MastodonPost extends Post<MastodonInstance> implements CommentablePost, DiscoverablePost, MentionablePost, ReactablePost, ReportablePost, ShareablePost {}

class PleromaPost extends Post<PleromaInstance> implements CommentablePost, DiscoverablePost, MentionablePost, ReportablePost, RichReactablePost, ShareablePost {}

interface RichReactablePost extends ReactablePost {} // supporting custom reactions other than "likes"

By defining classes this way, app developers can check for an unknown Post-based object's ability to be mentioned (reposted/renoted) by checking if the given class implements the MentionablePost interface, then calling the inherited method to check for support.

And without having to check the instance the Post originally came from, app developers can check for specific support like Custom Reactions by checking if the object implements the RichReactablePost interface. Which unfortunately, Mastodon does not supports it.

🔌 Plug-n-Play Integration

Excessive use of Classes, Interfaces, and inheritance allows everyone to add support for Fediverse servers beyond popular ones like Mastodon. And once enabled, app developers only need to update our client to get these new integrations, out of the box.

🌐 It doesn't always have to support ActivityPub (and decentralization, too!)

teropong is also designed to work for services which do not support ActivityPub, a W3C standard for modern decentralized social media communication. We have also provided limited support for Telegram channels, GNU MediaGoblin as well as websites which supports Microformats and Webmentions.

teropong can also be used as a boilerplate for developers to develop private social media-like services, by using our well-documented classes and interfaces to create custom API clients. Note that if you would like to do so, consider use import aliases when importing our libraries to avoid future class name conflicts with your implementation.