cjrasmussen/mastodon-api

Simple helper for interacting with Mastodon's API

1.1.0 2023-07-23 04:22 UTC

This package is auto-updated.

Last update: 2024-04-23 06:03:07 UTC


README

Simple class for making requests to the Mastodon API.

Usage

use cjrasmussen\MastodonApi\MastodonApi;

$mastodon = new MastodonApi($server);

// SEND A TOOT WITH BEARER TOKEN
$mastodon->setBearerToken($bearer_token);
$response = $mastodon->request('POST', 'v1/statuses', ['status' => 'Toot text']);

Installation

Simply add a dependency on cjrasmussen/mastodon-api to your composer.json file if you use Composer to manage the dependencies of your project:

composer require cjrasmussen/mastodon-api

Although it's recommended to use Composer, you can actually include the file(s) any way you want.

License

MastodonApi is MIT licensed.