Download the PHP package zumba/deadmanssnitch-sdk without Composer
On this page you can find all versions of the php package zumba/deadmanssnitch-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zumba/deadmanssnitch-sdk
More information about zumba/deadmanssnitch-sdk
Files in zumba/deadmanssnitch-sdk
Package deadmanssnitch-sdk
Short Description Deadmanssnitch API SDK
License MIT
Homepage https://github.com/zumba/deadmanssnitch-php-sdk
Informations about the package deadmanssnitch-sdk
Deadmansnitch API PHP SDK
This library allows for easy access to Deadmanssnitch's API.
You can use it to manage snitches through the API or to notify a snitch when a process completes.
Example Notifier use
Example API Use
Installation
Supported APIs
Supports pinging the nosnch.in domain for a specific snitch. See Notifier::pingSnitch(string $token, string $message = ''): void.
The SDK currently supports v1 of DMS's API.
- Creating a snitch -
Client::createSnitch(Snitch $snitch): void - Listing snitches -
Client::listSnitches(array $tags = []): []Snitch- Includes ability to filter by tags
- Examining snitches -
Client::examineSnitch(string $token): Snitch - Editing a snitch -
Client::editSnitch(Snitch $snitch): void- Also supports appending tags and removing a single tag (per the API).
- Setting tags on a snitch and using edit will replace the tags with what is provided.
- Pausing a snitch -
Client::pauseSnitch(string $token): void - Deleting a snitch -
Client::removeSnitch(string $token): void
Note, we will not support attaining an API key with username/password.
Advanced usage
You can provide your own http client and logger to use provided they satisfy the
GuzzleHttp\ClientInterface and Psr\Log\LoggerInterface respectively:
However, please note that guzzle clients are immutable, so you will be responsible
for setting the base URI and auth parameters. Internally, http_errors is disabled
in order to wrap and use our own exceptions. If you do not disable this, you will
need to catch Guzzle exceptions instead of Zumba\Deadmanssnitch\ResponseError.
All versions of deadmanssnitch-sdk with dependencies
psr/log Version ^1.0
guzzlehttp/guzzle Version ^6.0 || ^7.0
cakephp/datasource Version ^4.0