Download the PHP package happydemon/statuscake without Composer
On this page you can find all versions of the php package happydemon/statuscake. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download happydemon/statuscake
More information about happydemon/statuscake
Files in happydemon/statuscake
Package statuscake
Short Description Interface for StatusCake API
License MIT
Homepage https://github.com/happyDemon/statuscake
Informations about the package statuscake
StatusCake API wrapper
StatusCake is a monitoring service that monitors website/servers over HTTP/TCP/PING.
This project wraps most endpoints StatusCake has to offer.
Install
Via Composer
Usage
Setting up the client:
Checking if the credentials are valid:
Getting basic account info:
Tests
These are actually your monitors, each test would represent a website you're monitoring.
Each returned test will be parsed into a class StatusCake\Test
, all the properties are documented in there, be sure to check it out.
Creating a test
To create a test you need to initialise StatusCake\Test
. There are just a few properties that are actually required; websiteName, websiteURL, testType.
Updating a test
Updating is done in the same way:
Deleting a test
Retrieving tests
Retrieving a list of existing tests is simple:
Retrieving a test's period
A period of data is two time stamps in which status has remained the same.
Retrieving a test's performance data
Retrieves a list of checks performed for the current site (this statusCake users with a premium account).
Retrieve a test's previously sent alerts
Retrieves a list of alerts that have, previously, been sent.
Contact Groups
One of the properties tests could need assigned is contact groups. You can retrieve and manage them through the API as wel.
The same principles as Tests are applied here, meaning every contact group will be loaded in a StatusCake\ContactGroup
class (check the class definition for more info on the properties).
A few helper functions are included to work with email addresses.