cjrasmussen / mastodon-api
Simple helper for interacting with Mastodon's API
1.2.2
2024-09-28 16:16 UTC
Requires
- php: >=7.4.0
- ext-curl: *
- ext-json: *
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.