2017 © Pedro PelĆ”ez
 

library pitcher

Pitcher Library

image

braune-digital/pitcher

Pitcher Library

  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 15 % Grown

The README.md

Pitcher

, (*1)

Pitcher App (http://www.pitcher-app.com) is a webservice which allows you to easily send exceptions from your project. In contrast to classical monitoring webservices, Pitcher is able to pitch individual exceptions from projects, where Pitcher is acting like a satellite which communicates whith ground control. Register now at pitcher-app.com and create your project. After receiving the secret, the next step is installing the PHP component (or Bundle in case of using Symfony) and linking the satellite by defining the secret., (*2)

This PHP component allows you to send notifications through different channels (iOS Push Notification, E-Mail or WAMP Websocket)., (*3)

Integrations

Currently thereĀ“s a bundle for Symfony which integrates the component as a service (https://github.com/braune-digital/BrauneDigitalPitcherBundle)., (*4)

Installation

Install the package with composer into your project:, (*5)

composer require braune-digital/pitcher "^1.0"

Usage

The BaseClient implements the ClientInterface and allows you to pitch exceptions with GuzzleHTTP to the Pitcher App., (*6)

<?php

namespace BrauneDigital\Pitcher\Client;

use Psr\Log\LoggerInterface;

interface ClientInterface {

    /**
     * @param $level
     * @param $message
     * @return mixed
     */
    public function pitch($level, $message);

    /**
     * @return mixed
     */
    public function getLogger();

    /**
     * @param LoggerInterface $
     * @return mixed
     */
    public function setLogger(LoggerInterface $logger);

}

You can use this BaseClient and pitch messages:, (*7)

$client = new \BrauneDigital\Pitcher\Client\BaseClient('SATELLITE_NAME', 'SECRET');
$client->pitch(\BrauneDigital\Pitcher\Notification\Notification::LEVEL_CRITICAL, 'XML API from server B is down');

The Pitcher App returns a JSON-Reponse:, (*8)

{"success":true,"payload":{"level":"critical","message":"XML API from server B is down","date":"2016-04-13T13:23:15+0200","satellite":"YOU_ARE_FREE_TO_CHOOSE_A_NAME","checked":false,"id":141},"errors":[]}

Now you will get notifications from the Pitcher app. You can define notification channels in your user profile at http://www.pitcher-app.com/#/login., (*9)

The Versions

03/02 2017

1.0.x-dev

1.0.9999999.9999999-dev

Pitcher Library

  Sources   Download

MIT

by Patrick Rathje
by Henrik Braune

pitcher bundle watch health check notification exeption

21/09 2016

1.0.0

1.0.0.0

Pitcher Library

  Sources   Download

MIT

by Patrick Rathje
by Henrik Braune

pitcher bundle watch health check notification exeption

22/04 2016

dev-master

9999999-dev

Pitcher Library

  Sources   Download

MIT

by Patrick Rathje
by Henrik Braune

pitcher bundle watch health check notification exeption