verifiedjoseph/gotify-api-php

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

v1.6.0 2021-12-31 17:21 UTC

This package is auto-updated.

Last update: 2022-01-24 15:06:45 UTC


README

Latest Version Software License

gotify-api-php is a PHP library for interacting with a Gotify server using the Gotify REST-API.

Supports Gotify server version 2.1.4.

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->get(),
  $auth->get()
);

// Send a message
$message->create(
  title: 'hello?',
  message: 'Hello World',
  priority: Message::PRIORITY_HIGH,
);

Documentation

Requirements

  • PHP >= 8.0
  • 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.