Releases: ohdearapp/ohdear-php-sdk
Releases · ohdearapp/ohdear-php-sdk
3.1.2
- make description optional in cron checks
3.1.1
- make description optional in cron checks
3.1.0
3.0.4
- more fixes around performance records
3.0.3
3.0.2
- add support for PHP 8
3.0.1
- add support for Guzzle 7
3.0.0
- add support for cron sync
- drop support for PHP 7.3 and below
Breaking changes in the date-format
This release introduces 2 breaking changes in the way the dates are passed for these functions:
performanceRecords()
createSiteMaintenance()
Previously, you had to pass the date as a string notation, and the format was different for each method.
performanceRecords(1, 20200607000000, 20200608000000);
createSiteMaintenance(1, '2020-05-19 13:00', '2020-05-19 13:02');
This was inconsistent and not very flexible.
You can now pass the dates in any format you like, the SDK will convert it to the notation our API expects. In other words, you can now do this:
performanceRecords(1, '2020-06-07', '2020-06-08');
performanceRecords(1, '2020-06-07 09:00:00', '2020-06-08 17:00:00');
createSiteMaintenance(1, '2020-05-19', '2020-05-20');
createSiteMaintenance(1, '2020-05-19 09:00:00', '2020-05-20 17:00:00');
Add support for retrieving performance metrics from the API
This release adds support for the following new method:
<?php
$records = $ohDear->performanceRecords(1, 20200607000000, 20200608000000);
Which uses the new performance records API endpoint.