21 lines
No EOL
1 KiB
PHP
21 lines
No EOL
1 KiB
PHP
<?php
|
|
// MastodonAPI extension, https://codeberg.org/simonpipe/yellow-mastodonapi
|
|
|
|
class YellowMastodonAPI {
|
|
const VERSION = "0.1";
|
|
|
|
public $yellow;
|
|
|
|
// Handle initialisation
|
|
public function onLoad($yellow) {
|
|
$this->yellow = $yellow;
|
|
$this->yellow->system->setDefault("mastodonapiInstanceUrl", "https://mastodon.social"); // Deine Mastodon Instanz-URL
|
|
$this->yellow->system->setDefault("mastodonapiUserId", ""); // Deine Mastodon User ID (numerisch, z.B. 1234567890)
|
|
$this->yellow->system->setDefault("mastodonapiAccessToken", ""); // Optional: Dein persönlicher API-Token (read:statuses)
|
|
$this->yellow->system->setDefault("mastodonapiHashtag", "");
|
|
$this->yellow->system->setDefault("mastodonapiAuthor", "YellowUser");
|
|
$this->yellow->system->setDefault("mastodonapiTag", "Fediverse");
|
|
$this->yellow->system->setDefault("mastodonapiFolder", "content/1-blog/");
|
|
$this->yellow->system->setDefault("mastodonapiTriggerPath", "/mastodonapi-webhook-CHANGE_THIS_SECRET_KEY");
|
|
}
|
|
} |