anothemes2021 / updown-php-sdk
UpDown PHP SDK.
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 1
pkg:composer/anothemes2021/updown-php-sdk
Requires
- php: >=7.1.1
- guzzlehttp/guzzle: 5.*|6.*
Requires (Dev)
- ext-curl: *
- phpdocumentor/reflection-docblock: ~2.0
- phpunit/phpunit: ^7.0
- psr/log: ^1.0
- sami/sami: ^4.1
This package is not auto-updated.
Last update: 2025-10-30 05:51:23 UTC
README
UpDown.io PHP SDK
Documentation
Now you can find compete documentation here
Frameworks
Getting started
First of all you need a UpDown.io account.
Further info/documentation will be ready ASAP.
Installation
You can install the package via composer:
composer require biscolab/updown-php-sdk
Configuration
API key
First of all you need an API key: Get API Key
Initialize the UpDown and create Check object
use Biscolab\UpDown\UpDown; use Biscolab\UpDown\Objects\Check; use Biscolab\UpDown\Fields\UpDownRequestFields; // Initialize UpDown UpDown::init([ UpDownRequestFields::API_KEY => '<YOUR_UPDOWN_API_KEY>' ]); // Create an empty "Check" CRUD object $check = new Check(); // OR // Create an existing "Check" CRUD object $check = new Check($attributes);
- $checkis a CRUD object, so it has- create,- read,- updateand- deletemethods available.
- $attributescould an array containing a list of attributes (- Biscolab\UpDown\Fields\CheckFields) or a scalar value representing the token given by updown.io.
Usage
Create Check object on updown.io
$check = new Check($attributes); $check->create();
Read Check data from updown.io
$check = new Check($token); $check->read(); // get data as array $array_data = $check->toArray(); // get single value $url = $check->{UpDownRequestFields::URL};
Use Enum values like
UpDownRequestFieldsto avoid errors
Update Check on updown.io
$check = new Check($token); $check->update($attributes);
Delete Check from updown.io
$check = new Check($token); $deleted = $check->delete();
- $deletedis bool,- trueif "ok",- falseif something went wrong
Get Check "Metrics" from updown.io
$check = new Check($token); $metrics = $check->getMetrics($from, $to, $group);
- $metricsis anf objact of class- Biscolab\UpDown\Types\Metrics
Get Check "Downtimes" from updown.io
$check = new Check($token); $downtimes = $check->getDowntimes($page);
- $downtimesis anf objact of class- Biscolab\UpDown\Types\DownTimes, a collection of- Biscolab\UpDown\Types\DownTimeobjects