PHP library for interacting with a Gotify server using the Gotify REST-API.
Supports Gotify server version 2.5.0.
composer require verifiedjoseph/gotify-api-php
require __DIR__ . '/vendor/autoload.php';
use Gotify\Server;
use Gotify\Auth\Token;
use Gotify\Endpoint\Message;
// Set server
$server = new Server('https://gotify.example.com/');
// Set application token
$auth = new Token('ApplicationTokenHere');
// Create a message class instance
$message = new Message($server, $auth);
// Send a message
$message->create(
title: 'hello?',
message: 'Hello World',
priority: Message::PRIORITY_HIGH,
);
All notable changes to this project are documented in the CHANGELOG.
MIT License. Please see LICENSE for more information.