verifiedjoseph/gotify-api-php

PHP library for interacting with a Gotify server using the Gotify REST-API.

v1.9.0 2024-08-01 16:21 UTC

README

Latest Version Software License

PHP library for interacting with a Gotify server using the Gotify REST-API.

Supports Gotify server version 2.5.0.

Install

composer require verifiedjoseph/gotify-api-php

Quick Start

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,
);

Documentation

Requirements

  • PHP >= 8.2
  • Composer
  • PHP Extensions:

Dependencies

guzzlehttp/guzzle

Changelog

All notable changes to this project are documented in the CHANGELOG.

License

MIT License. Please see LICENSE for more information.