connectholland/uptime-robot-bundle

Uptime Robot bundle for Symfony 4/5 projects

1.0.0 2020-07-15 09:43 UTC

This package is auto-updated.

Last update: 2020-10-15 10:27:41 UTC


README

Scrutinizer Code Quality Code Coverage Build Status

UptimeRobot bundle for Symfony 4/5 projects

Installation

composer require connectholland/uptime-robot-bundle

Environment

Set the environment variables to be able to connect to the UptimeRobot API.

UPTIMEROBOT_API_KEY=the-api-key

Usage

Autowire the client, e.g.:

<?php

declare(strict_types=1);

namespace App;

use ConnectHolland\UptimeRobotBundle\Api\Client;

class SomeService
{
    private Client $client;

    public function __construct(Client $client)
    {
        $this->client = $client;
    }
    
    public function someMethod()
    {
        $this->client->getMonitors();
    }
}