{"id":15021880,"url":"https://github.com/20steps/uptime-robot-bundle","last_synced_at":"2025-10-10T15:40:17.141Z","repository":{"id":56938084,"uuid":"97028313","full_name":"20steps/uptime-robot-bundle","owner":"20steps","description":"Symfony bundle for service-oriented client for UptimeRobot API v2.0","archived":false,"fork":false,"pushed_at":"2017-07-19T16:55:57.000Z","size":48,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T18:03:29.239Z","etag":null,"topics":["httplug","openapi","swagger","symfony","uptime-robot-bundle","uptimerobot","uptimerobot-api"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/20steps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-12T16:14:55.000Z","updated_at":"2018-10-16T14:03:44.000Z","dependencies_parsed_at":"2022-08-21T01:40:26.733Z","dependency_job_id":null,"html_url":"https://github.com/20steps/uptime-robot-bundle","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20steps%2Fuptime-robot-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20steps%2Fuptime-robot-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20steps%2Fuptime-robot-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20steps%2Fuptime-robot-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/20steps","download_url":"https://codeload.github.com/20steps/uptime-robot-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248289979,"owners_count":21078923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["httplug","openapi","swagger","symfony","uptime-robot-bundle","uptimerobot","uptimerobot-api"],"created_at":"2024-09-24T19:57:10.618Z","updated_at":"2025-10-10T15:40:12.094Z","avatar_url":"https://github.com/20steps.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 20steps/uptime-robot-bundle (twentystepsCommonsUptimeRobotBundle)\n\nAbout\n-----\n\nThe 20steps UptimeRobot Bundle contains a service-oriented client for [**UptimeRobot**][2] API v2.0.\n\nUse the bundle in scenarios where you want to automatically create monitors, alert contacts etc. at UptimeRobot.com for your given application or services or as part of your deployment process to automatically manage maintenance windows.\n\nThe Bundle is licensed under the [**LGPL license version 3.0**][4].\n\nInstallation\n------------\n\nPrerequisites: \n* Install [**Composer**][1], the dependency manager used by modern PHP applications.\n* Setup your Symfony 3 based application\n* Use PHP \u003e= 7.0 as a runtime\n\n1. Add the bundle to your composer.json and download a matching version by calling\n\n```bash\ncomposer require 20steps/commons-uptime-robot-bundle\n```\n\n2. Configure the API key of your account at UptimeRobot.com in your config.yml\n```bash\ntwentysteps_commons_uptime_robot:\n    api_key: \"Your API Key\"\n```\n\n\nUsage\n-----\n\nThe following code shows how to create a monitor with the client.\n\n```\n\u003c?php\n    \n\nuse twentysteps\\Commons\\UptimeRobotBundle\\API;\nuse twentysteps\\Commons\\UptimeRobotBundle\\Model;\n    \nclass MyService {\n    \n    /**\n     * @var UptimeRobotAPI\n     */\n    private $uptimeRobotAPI;\n\t    \n    /**\n     * inject dependency to uptimeRobotAPI via your services.yml\n     * the uptimeRobotAPI is a service itself with the id \"twentysteps_commons.uptime_robot.api\"\n     */\n    public function __construct(UptimeRobotAPI $uptimeRobotAPI) {\n        $this-\u003euptimeRobotAPI = $uptimeRobotAPI;\n    }\n    \n    /**\n     * create a monitor\n     * @return \\Psr\\Http\\Message\\ResponseInterface|Error|Monitor\n     */\n    public function createMonitorForMyResource() {\n        $parameters = [\n            'friendly_name' =\u003e 'My Monitor,\n            'url' =\u003e 'https://my-host.com/my-path'\n        ];\n        $response = $this-\u003euptimeRobotAPI-\u003emonitor()-\u003ecreate($parameters);\n        if ($response instanceof MonitorResponse) {\n            /**\n             * @var $response MonitorResponse\n             */\n            if ($response-\u003egetStat()=='ok') {\n                return $response-\u003egetMonitor();\n            } else {\n                return $response-\u003egetError();\n            }\n        }\n        return $response;\n    }\n}\n```\n\nThe bundle provides some useful commands below the twentysteps:commons:uptime-robot namespace.\n\nEg. to list all monitors and their stati simply call\n\n```\nbin/console twentysteps:commons:uptime-robot:monitor:list\n```\n\nHints\n-----\n\n* In case your application uses multiple accounts at UptimeRobot you can dynamically change\nthe api key as follows\n\n\n```\n\u003c?php\n    \n\n$this-\u003euptimeRobotAPI-\u003esetApiKey($myApiKey);\n\n```\n\n* Cp. section \"parameters\" of [**UptimeRobot API Documentation**][7] for an explanation of parameters.\n* The UptimeRobot API has been enhanced by some extra utility methods such as api-\u003emonitor()-\u003efindOneByUrl(..), api-\u003emonitor-\u003ecreateOrUpdate(..), api-\u003emonitor-\u003epauseByUrl(), api-\u003emonitor-\u003eresumeByUrl() etc.\n\nAuthors\n-------\n\n* Helmut Hoffer von Ankershoffen \u003chhva@20steps.de\u003e\n\nSponsored by\n------------\n\n[**20steps - Digital Full Service Boutique**][3]\n\n[1]:  https://getcomposer.org/\n[2]:  https://uptimerobot.com/\n[3]:  https://20steps.de\n[4]:  http://www.gnu.org/licenses/lgpl-3.0.html\n[5]:  https://github.com/janephp/openapi\n[6]:  https://swagger.io/specification/\n[7]:  https://uptimerobot.com/api\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F20steps%2Fuptime-robot-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F20steps%2Fuptime-robot-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F20steps%2Fuptime-robot-bundle/lists"}