Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 1.76 KB

README.md

File metadata and controls

34 lines (28 loc) · 1.76 KB

API Library

This library contains Combustible's bindings for the Lemmy API.

It consists of three main components:

Usage

This library can be downloaded from GitHub Packages.

Example

Connection connection = new Connection();
GetSite method = new GetSite();
connection.send(method, getSiteResponse -> {
    // Success
}, () -> {
    // Error
});

Threading

By default, all callbacks are executed on a new thread. This can be changed using the Connection.setCallbackHelper API.

For instance, if you want every callback to run on Android's UI thread, you could do:

connection.setCallbackHelper(action -> {
    activity.runOnUiThread(action);
});

OpenAPI

Combustible also generates an OpenAPI document that can be downloaded here. This document can be viewed in Swagger UI here.