1. Go to this page and download the library: Download koh/semantic-delivery library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
koh / semantic-delivery example snippets
final class MastodonDistributor implements DistributorInterface
{
public function getIdentifier(): string { return 'mastodon'; }
public function distribute(ChannelContent $content, string $platform, array $options = []): DistributionResult
{
// Call Mastodon API
return DistributionResult::success($statusId, $statusUrl);
}
public function getAvailablePlatforms(): array { return ['mastodon']; }
public function testConnection(): bool { return true; }
}