Coder Social home page Coder Social logo

ohdearapp / ohdear-php-sdk Goto Github PK

View Code? Open in Web Editor NEW
59.0 3.0 18.0 166 KB

An SDK written in PHP to work with the Oh Dear API

Home Page: https://ohdear.app

License: MIT License

PHP 100.00%
php sdk api ohdear uptime monitoring ssl certificate

ohdear-php-sdk's Introduction

An SDK to easily work with the Oh Dear API

Latest Version on Packagist Tests Total Downloads

This SDK lets you perform API calls to Oh Dear.

Documentation

All documentation, including examples and installation instructions, can be found on the Oh Dear docs.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

This package uses code from and is greatly inspired by the Forge SDK package by Mohammed Said.

License

The MIT License (MIT). Please see License File for more information.

ohdear-php-sdk's People

Contributors

abenerd avatar bryanmonzon avatar freekmurze avatar jorenvh avatar mattiasgeniar avatar minicodemonkey avatar owenvoke avatar resohead avatar rostockahoi avatar tobimori avatar vicdelfant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ohdear-php-sdk's Issues

"The given data failed to pass validation." when calling the certificate function

I am regulary getting the following error, when calling certificateHealth()

Screen Shot 2020-03-03 at 23 12 09

It does happening when calling something like this:

$ohDear->site($siteId)->certificateHealth();

Everything is working as expected. After calling the rout a few times, the error occurres. Waiting a little and everything does go back to normal for a while.

performanceRecords() appears to be incompatible with the API

Problem

PerformanceRecord objects are not filled with data, and incorrect number of records is returned due to API output not being normalized correctly.

3 items are always returned in the array, the 3rd item being pagination data.

Example

<?php
$records = $ohDear->performanceRecords($siteId, $date->format('Y-m-d'), $date->copy()->addDay()->format('Y-m-d'), '1h')
var_dump($records);
Output:

array(3) {
  ["data"]=>
  object(OhDear\PhpSdk\Resources\PerformanceRecord)#54 (28) {
    ["id"]=>
    uninitialized(int)
    ["siteId"]=>
    uninitialized(int)
    ["timeNamelookup"]=>
    uninitialized(int)
    ["timeConnect"]=>
    NULL
    ["timeAppconnect"]=>
    uninitialized(int)
    ["timeRemoteserver"]=>
    uninitialized(int)
    ["timeTotal"]=>
    uninitialized(int)
    ["attributes"]=>
    array(25) {
      [0]=>
      array(11) {
        ["id"]=>
        int(1162869135)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-02 00:00:00"
        ["time_namelookup"]=>
        float(0.043932)
        ["time_connect"]=>
        float(0.01453)
        ["time_appconnect"]=>
        float(0.046332)
        ["time_pretransfer"]=>
        float(6.3000000000007E-5)
        ["time_remoteserver"]=>
        float(0.039049)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.000223)
        ["time_total"]=>
        float(0.144129)
      }
      [1]=>
      array(11) {
        ["id"]=>
        int(1162552260)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 23:00:00"
        ["time_namelookup"]=>
        float(0.01222)
        ["time_connect"]=>
        float(0.014139)
        ["time_appconnect"]=>
        float(0.046402)
        ["time_pretransfer"]=>
        float(6.0999999999992E-5)
        ["time_remoteserver"]=>
        float(0.039261)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.00022)
        ["time_total"]=>
        float(0.112303)
      }
      [2]=>
      array(11) {
        ["id"]=>
        int(1162221343)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 22:00:00"
        ["time_namelookup"]=>
        float(0.013245)
        ["time_connect"]=>
        float(0.014109)
        ["time_appconnect"]=>
        float(0.047161)
        ["time_pretransfer"]=>
        float(6.2000000000006E-5)
        ["time_remoteserver"]=>
        float(0.03738)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.092124)
        ["time_total"]=>
        float(0.204081)
      }
      [3]=>
      array(11) {
        ["id"]=>
        int(1161897311)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 21:00:00"
        ["time_namelookup"]=>
        float(0.009933)
        ["time_connect"]=>
        float(0.014979)
        ["time_appconnect"]=>
        float(0.048059)
        ["time_pretransfer"]=>
        float(6.8000000000012E-5)
        ["time_remoteserver"]=>
        float(0.037874)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.00024)
        ["time_total"]=>
        float(0.111153)
      }
      [4]=>
      array(11) {
        ["id"]=>
        int(1161573485)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 20:00:00"
        ["time_namelookup"]=>
        float(0.015257)
        ["time_connect"]=>
        float(0.015163)
        ["time_appconnect"]=>
        float(0.053481)
        ["time_pretransfer"]=>
        float(6.5999999999997E-5)
        ["time_remoteserver"]=>
        float(0.037513)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.000248)
        ["time_total"]=>
        float(0.121728)
      }
      [5]=>
      array(11) {
        ["id"]=>
        int(1161250452)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 19:00:00"
        ["time_namelookup"]=>
        float(0.016594)
        ["time_connect"]=>
        float(0.014773)
        ["time_appconnect"]=>
        float(0.048044)
        ["time_pretransfer"]=>
        float(6.3000000000007E-5)
        ["time_remoteserver"]=>
        float(0.03837)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.000219)
        ["time_total"]=>
        float(0.118063)
      }
      [6]=>
      array(11) {
        ["id"]=>
        int(1160925932)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 18:00:00"
        ["time_namelookup"]=>
        float(0.012792)
        ["time_connect"]=>
        float(0.01454)
        ["time_appconnect"]=>
        float(0.047271)
        ["time_pretransfer"]=>
        float(6.1999999999993E-5)
        ["time_remoteserver"]=>
        float(0.037925)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.00021700000000001)
        ["time_total"]=>
        float(0.112807)
      }
      [7]=>
      array(11) {
        ["id"]=>
        int(1160602351)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 17:00:00"
        ["time_namelookup"]=>
        float(0.017301)
        ["time_connect"]=>
        float(0.014362)
        ["time_appconnect"]=>
        float(0.048105)
        ["time_pretransfer"]=>
        float(5.9999999999991E-5)
        ["time_remoteserver"]=>
        float(0.038039)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.000212)
        ["time_total"]=>
        float(0.118079)
      }
      [8]=>
      array(11) {
        ["id"]=>
        int(1160278067)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 16:00:00"
        ["time_namelookup"]=>
        float(0.031345)
        ["time_connect"]=>
        float(0.01465)
        ["time_appconnect"]=>
        float(0.046719)
        ["time_pretransfer"]=>
        float(6.2999999999994E-5)
        ["time_remoteserver"]=>
        float(0.037688)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.000226)
        ["time_total"]=>
        float(0.130691)
      }
      [9]=>
      array(11) {
        ["id"]=>
        int(1159955378)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 15:00:00"
        ["time_namelookup"]=>
        float(0.018226)
        ["time_connect"]=>
        float(0.015149)
        ["time_appconnect"]=>
        float(0.049648)
        ["time_pretransfer"]=>
        float(6.0000000000004E-5)
        ["time_remoteserver"]=>
        float(0.037913)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.00020999999999999)
        ["time_total"]=>
        float(0.121206)
      }
      [10]=>
      array(11) {
        ["id"]=>
        int(1159630736)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 14:00:00"
        ["time_namelookup"]=>
        float(0.01516)
        ["time_connect"]=>
        float(0.01484)
        ["time_appconnect"]=>
        float(0.046033)
        ["time_pretransfer"]=>
        float(6.3999999999995E-5)
        ["time_remoteserver"]=>
        float(0.03705)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.000224)
        ["time_total"]=>
        float(0.113371)
      }
      [11]=>
      array(11) {
        ["id"]=>
        int(1159306839)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 13:00:00"
        ["time_namelookup"]=>
        float(0.080494)
        ["time_connect"]=>
        float(0.014812)
        ["time_appconnect"]=>
        float(0.047969)
        ["time_pretransfer"]=>
        float(6.4999999999982E-5)
        ["time_remoteserver"]=>
        float(0.038934)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.00028400000000001)
        ["time_total"]=>
        float(0.182558)
      }
      [12]=>
      array(11) {
        ["id"]=>
        int(1158982802)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 12:00:00"
        ["time_namelookup"]=>
        float(0.013445)
        ["time_connect"]=>
        float(0.014586)
        ["time_appconnect"]=>
        float(0.046331)
        ["time_pretransfer"]=>
        float(6.4000000000008E-5)
        ["time_remoteserver"]=>
        float(0.040324)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.000231)
        ["time_total"]=>
        float(0.114981)
      }
      [13]=>
      array(11) {
        ["id"]=>
        int(1158661348)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 11:00:00"
        ["time_namelookup"]=>
        float(0.037203)
        ["time_connect"]=>
        float(0.014696)
        ["time_appconnect"]=>
        float(0.047281)
        ["time_pretransfer"]=>
        float(6.6999999999998E-5)
        ["time_remoteserver"]=>
        float(0.040355)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.00022900000000001)
        ["time_total"]=>
        float(0.139831)
      }
      [14]=>
      array(11) {
        ["id"]=>
        int(1158337895)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 10:00:00"
        ["time_namelookup"]=>
        float(0.016592)
        ["time_connect"]=>
        float(0.014631)
        ["time_appconnect"]=>
        float(0.04617)
        ["time_pretransfer"]=>
        float(5.899999999999E-5)
        ["time_remoteserver"]=>
        float(0.039697)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.00024299999999999)
        ["time_total"]=>
        float(0.117392)
      }
      [15]=>
      array(11) {
        ["id"]=>
        int(1158014995)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 09:00:00"
        ["time_namelookup"]=>
        float(0.030121)
        ["time_connect"]=>
        float(0.014439)
        ["time_appconnect"]=>
        float(0.045655)
        ["time_pretransfer"]=>
        float(6.0999999999992E-5)
        ["time_remoteserver"]=>
        float(0.038925)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.00021099999999999)
        ["time_total"]=>
        float(0.129412)
      }
      [16]=>
      array(11) {
        ["id"]=>
        int(1157730305)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 08:00:00"
        ["time_namelookup"]=>
        float(0.020209)
        ["time_connect"]=>
        float(0.015913)
        ["time_appconnect"]=>
        float(0.049618)
        ["time_pretransfer"]=>
        float(5.4999999999999E-5)
        ["time_remoteserver"]=>
        float(0.037951)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.00022900000000001)
        ["time_total"]=>
        float(0.123975)
      }
      [17]=>
      array(11) {
        ["id"]=>
        int(1157370440)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 07:00:00"
        ["time_namelookup"]=>
        float(0.014762)
        ["time_connect"]=>
        float(0.014315)
        ["time_appconnect"]=>
        float(0.044328)
        ["time_pretransfer"]=>
        float(6.1000000000005E-5)
        ["time_remoteserver"]=>
        float(0.038253)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.000254)
        ["time_total"]=>
        float(0.111973)
      }
      [18]=>
      array(11) {
        ["id"]=>
        int(1157047937)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 06:00:00"
        ["time_namelookup"]=>
        float(0.018062)
        ["time_connect"]=>
        float(0.014588)
        ["time_appconnect"]=>
        float(0.046076)
        ["time_pretransfer"]=>
        float(6.6999999999998E-5)
        ["time_remoteserver"]=>
        float(0.037642)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.00021700000000001)
        ["time_total"]=>
        float(0.116652)
      }
      [19]=>
      array(11) {
        ["id"]=>
        int(1156724148)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 05:00:00"
        ["time_namelookup"]=>
        float(0.013463)
        ["time_connect"]=>
        float(0.014481)
        ["time_appconnect"]=>
        float(0.0462)
        ["time_pretransfer"]=>
        float(6.2999999999994E-5)
        ["time_remoteserver"]=>
        float(0.036759)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.00020600000000001)
        ["time_total"]=>
        float(0.111172)
      }
      [20]=>
      array(11) {
        ["id"]=>
        int(1156403239)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 04:00:00"
        ["time_namelookup"]=>
        float(0.048274)
        ["time_connect"]=>
        float(0.014586)
        ["time_appconnect"]=>
        float(0.044043)
        ["time_pretransfer"]=>
        float(5.7000000000001E-5)
        ["time_remoteserver"]=>
        float(0.03761)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.00020999999999999)
        ["time_total"]=>
        float(0.14478)
      }
      [21]=>
      array(11) {
        ["id"]=>
        int(1156080678)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 03:00:00"
        ["time_namelookup"]=>
        float(0.011763)
        ["time_connect"]=>
        float(0.014587)
        ["time_appconnect"]=>
        float(0.045624)
        ["time_pretransfer"]=>
        float(6.9E-5)
        ["time_remoteserver"]=>
        float(0.038051)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.00021400000000001)
        ["time_total"]=>
        float(0.110308)
      }
      [22]=>
      array(11) {
        ["id"]=>
        int(1155757642)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 02:00:00"
        ["time_namelookup"]=>
        float(0.019424)
        ["time_connect"]=>
        float(0.014405)
        ["time_appconnect"]=>
        float(0.046653)
        ["time_pretransfer"]=>
        float(6.1000000000005E-5)
        ["time_remoteserver"]=>
        float(0.037825)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.000211)
        ["time_total"]=>
        float(0.118579)
      }
      [23]=>
      array(11) {
        ["id"]=>
        int(1155436363)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 01:00:00"
        ["time_namelookup"]=>
        float(0.015646)
        ["time_connect"]=>
        float(0.014643)
        ["time_appconnect"]=>
        float(0.045531)
        ["time_pretransfer"]=>
        float(5.6E-5)
        ["time_remoteserver"]=>
        float(0.037469)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.00021599999999999)
        ["time_total"]=>
        float(0.113561)
      }
      [24]=>
      array(11) {
        ["id"]=>
        int(1155112330)
        ["site_id"]=>
        int(11590)
        ["created_at"]=>
        string(19) "2020-10-01 00:00:00"
        ["time_namelookup"]=>
        float(0.044465)
        ["time_connect"]=>
        float(0.014311)
        ["time_appconnect"]=>
        float(0.046225)
        ["time_pretransfer"]=>
        float(6.3000000000007E-5)
        ["time_remoteserver"]=>
        float(0.038364)
        ["time_redirect"]=>
        int(0)
        ["time_download"]=>
        float(0.00028900000000001)
        ["time_total"]=>
        float(0.143717)
      }
    }
    ["ohDear":protected]=>
    object(OhDear\PhpSdk\OhDear)#25 (2) {
      ["apiToken"]=>
      string(60) "REDACTED"
      ["client"]=>
      object(GuzzleHttp\Client)#26 (1) {
        ["config":"GuzzleHttp\Client":private]=>
        array(9) {
          ["base_uri"]=>
          object(GuzzleHttp\Psr7\Uri)#39 (7) {
            ["scheme":"GuzzleHttp\Psr7\Uri":private]=>
            string(5) "https"
            ["userInfo":"GuzzleHttp\Psr7\Uri":private]=>
            string(0) ""
            ["host":"GuzzleHttp\Psr7\Uri":private]=>
            string(10) "ohdear.app"
            ["port":"GuzzleHttp\Psr7\Uri":private]=>
            NULL
            ["path":"GuzzleHttp\Psr7\Uri":private]=>
            string(5) "/api/"
            ["query":"GuzzleHttp\Psr7\Uri":private]=>
            string(0) ""
            ["fragment":"GuzzleHttp\Psr7\Uri":private]=>
            string(0) ""
          }
          ["http_errors"]=>
          bool(false)
          ["verify"]=>
          bool(false)
          ["headers"]=>
          array(4) {
            ["Authorization"]=>
            string(67) "Bearer REDACTED"
            ["Accept"]=>
            string(16) "application/json"
            ["Content-Type"]=>
            string(16) "application/json"
            ["User-Agent"]=>
            string(12) "GuzzleHttp/7"
          }
          ["handler"]=>
          object(GuzzleHttp\HandlerStack)#27 (3) {
            ["handler":"GuzzleHttp\HandlerStack":private]=>
            object(Closure)#34 (2) {
              ["static"]=>
              array(2) {
                ["default"]=>
                object(Closure)#32 (2) {
                  ["static"]=>
                  array(2) {
                    ["default"]=>
                    object(GuzzleHttp\Handler\CurlMultiHandler)#28 (6) {
                      ["factory":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      object(GuzzleHttp\Handler\CurlFactory)#29 (2) {
                        ["handles":"GuzzleHttp\Handler\CurlFactory":private]=>
                        array(0) {
                        }
                        ["maxHandles":"GuzzleHttp\Handler\CurlFactory":private]=>
                        int(50)
                      }
                      ["selectTimeout":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      int(1)
                      ["active":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      NULL
                      ["handles":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      array(0) {
                      }
                      ["delays":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      array(0) {
                      }
                      ["options":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      array(0) {
                      }
                    }
                    ["sync"]=>
                    object(GuzzleHttp\Handler\CurlHandler)#30 (1) {
                      ["factory":"GuzzleHttp\Handler\CurlHandler":private]=>
                      object(GuzzleHttp\Handler\CurlFactory)#31 (2) {
                        ["handles":"GuzzleHttp\Handler\CurlFactory":private]=>
                        array(1) {
                          [0]=>
                          resource(137) of type (curl)
                        }
                        ["maxHandles":"GuzzleHttp\Handler\CurlFactory":private]=>
                        int(3)
                      }
                    }
                  }
                  ["parameter"]=>
                  array(2) {
                    ["$request"]=>
                    string(10) "<required>"
                    ["$options"]=>
                    string(10) "<required>"
                  }
                }
                ["streaming"]=>
                object(GuzzleHttp\Handler\StreamHandler)#33 (1) {
                  ["lastHeaders":"GuzzleHttp\Handler\StreamHandler":private]=>
                  array(0) {
                  }
                }
              }
              ["parameter"]=>
              array(2) {
                ["$request"]=>
                string(10) "<required>"
                ["$options"]=>
                string(10) "<required>"
              }
            }
            ["stack":"GuzzleHttp\HandlerStack":private]=>
            array(4) {
              [0]=>
              array(2) {
                [0]=>
                object(Closure)#35 (2) {
                  ["static"]=>
                  array(1) {
                    ["bodySummarizer"]=>
                    NULL
                  }
                  ["parameter"]=>
                  array(1) {
                    ["$handler"]=>
                    string(10) "<required>"
                  }
                }
                [1]=>
                string(11) "http_errors"
              }
              [1]=>
              array(2) {
                [0]=>
                object(Closure)#36 (1) {
                  ["parameter"]=>
                  array(1) {
                    ["$handler"]=>
                    string(10) "<required>"
                  }
                }
                [1]=>
                string(15) "allow_redirects"
              }
              [2]=>
              array(2) {
                [0]=>
                object(Closure)#37 (1) {
                  ["parameter"]=>
                  array(1) {
                    ["$handler"]=>
                    string(10) "<required>"
                  }
                }
                [1]=>
                string(7) "cookies"
              }
              [3]=>
              array(2) {
                [0]=>
                object(Closure)#38 (1) {
                  ["parameter"]=>
                  array(1) {
                    ["$handler"]=>
                    string(10) "<required>"
                  }
                }
                [1]=>
                string(12) "prepare_body"
              }
            }
            ["cached":"GuzzleHttp\HandlerStack":private]=>
            object(Closure)#47 (2) {
              ["static"]=>
              array(2) {
                ["handler"]=>
                object(GuzzleHttp\RedirectMiddleware)#46 (1) {
                  ["nextHandler":"GuzzleHttp\RedirectMiddleware":private]=>
                  object(Closure)#45 (2) {
                    ["static"]=>
                    array(1) {
                      ["handler"]=>
                      object(GuzzleHttp\PrepareBodyMiddleware)#42 (1) {
                        ["nextHandler":"GuzzleHttp\PrepareBodyMiddleware":private]=>
                        object(Closure)#34 (2) {
                          ["static"]=>
                          array(2) {
                            ["default"]=>
                            object(Closure)#32 (2) {
                              ["static"]=>
                              array(2) {
                                ["default"]=>
                                object(GuzzleHttp\Handler\CurlMultiHandler)#28 (6) {
                                  ["factory":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  object(GuzzleHttp\Handler\CurlFactory)#29 (2) {
                                    ["handles":"GuzzleHttp\Handler\CurlFactory":private]=>
                                    array(0) {
                                    }
                                    ["maxHandles":"GuzzleHttp\Handler\CurlFactory":private]=>
                                    int(50)
                                  }
                                  ["selectTimeout":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  int(1)
                                  ["active":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  NULL
                                  ["handles":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  array(0) {
                                  }
                                  ["delays":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  array(0) {
                                  }
                                  ["options":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  array(0) {
                                  }
                                }
                                ["sync"]=>
                                object(GuzzleHttp\Handler\CurlHandler)#30 (1) {
                                  ["factory":"GuzzleHttp\Handler\CurlHandler":private]=>
                                  object(GuzzleHttp\Handler\CurlFactory)#31 (2) {
                                    ["handles":"GuzzleHttp\Handler\CurlFactory":private]=>
                                    array(1) {
                                      [0]=>
                                      resource(137) of type (curl)
                                    }
                                    ["maxHandles":"GuzzleHttp\Handler\CurlFactory":private]=>
                                    int(3)
                                  }
                                }
                              }
                              ["parameter"]=>
                              array(2) {
                                ["$request"]=>
                                string(10) "<required>"
                                ["$options"]=>
                                string(10) "<required>"
                              }
                            }
                            ["streaming"]=>
                            object(GuzzleHttp\Handler\StreamHandler)#33 (1) {
                              ["lastHeaders":"GuzzleHttp\Handler\StreamHandler":private]=>
                              array(0) {
                              }
                            }
                          }
                          ["parameter"]=>
                          array(2) {
                            ["$request"]=>
                            string(10) "<required>"
                            ["$options"]=>
                            string(10) "<required>"
                          }
                        }
                      }
                    }
                    ["parameter"]=>
                    array(2) {
                      ["$request"]=>
                      string(10) "<required>"
                      ["$options"]=>
                      string(10) "<required>"
                    }
                  }
                }
                ["bodySummarizer"]=>
                NULL
              }
              ["parameter"]=>
              array(2) {
                ["$request"]=>
                string(10) "<required>"
                ["$options"]=>
                string(10) "<required>"
              }
            }
          }
          ["allow_redirects"]=>
          array(5) {
            ["max"]=>
            int(5)
            ["protocols"]=>
            array(2) {
              [0]=>
              string(4) "http"
              [1]=>
              string(5) "https"
            }
            ["strict"]=>
            bool(false)
            ["referer"]=>
            bool(false)
            ["track_redirects"]=>
            bool(false)
          }
          ["decode_content"]=>
          bool(true)
          ["cookies"]=>
          bool(false)
          ["idn_conversion"]=>
          bool(false)
        }
      }
    }
    ["0"]=>
    array(11) {
      ["id"]=>
      int(1162869135)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-02 00:00:00"
      ["time_namelookup"]=>
      float(0.043932)
      ["time_connect"]=>
      float(0.01453)
      ["time_appconnect"]=>
      float(0.046332)
      ["time_pretransfer"]=>
      float(6.3000000000007E-5)
      ["time_remoteserver"]=>
      float(0.039049)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.000223)
      ["time_total"]=>
      float(0.144129)
    }
    ["1"]=>
    array(11) {
      ["id"]=>
      int(1162552260)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 23:00:00"
      ["time_namelookup"]=>
      float(0.01222)
      ["time_connect"]=>
      float(0.014139)
      ["time_appconnect"]=>
      float(0.046402)
      ["time_pretransfer"]=>
      float(6.0999999999992E-5)
      ["time_remoteserver"]=>
      float(0.039261)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.00022)
      ["time_total"]=>
      float(0.112303)
    }
    ["2"]=>
    array(11) {
      ["id"]=>
      int(1162221343)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 22:00:00"
      ["time_namelookup"]=>
      float(0.013245)
      ["time_connect"]=>
      float(0.014109)
      ["time_appconnect"]=>
      float(0.047161)
      ["time_pretransfer"]=>
      float(6.2000000000006E-5)
      ["time_remoteserver"]=>
      float(0.03738)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.092124)
      ["time_total"]=>
      float(0.204081)
    }
    ["3"]=>
    array(11) {
      ["id"]=>
      int(1161897311)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 21:00:00"
      ["time_namelookup"]=>
      float(0.009933)
      ["time_connect"]=>
      float(0.014979)
      ["time_appconnect"]=>
      float(0.048059)
      ["time_pretransfer"]=>
      float(6.8000000000012E-5)
      ["time_remoteserver"]=>
      float(0.037874)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.00024)
      ["time_total"]=>
      float(0.111153)
    }
    ["4"]=>
    array(11) {
      ["id"]=>
      int(1161573485)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 20:00:00"
      ["time_namelookup"]=>
      float(0.015257)
      ["time_connect"]=>
      float(0.015163)
      ["time_appconnect"]=>
      float(0.053481)
      ["time_pretransfer"]=>
      float(6.5999999999997E-5)
      ["time_remoteserver"]=>
      float(0.037513)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.000248)
      ["time_total"]=>
      float(0.121728)
    }
    ["5"]=>
    array(11) {
      ["id"]=>
      int(1161250452)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 19:00:00"
      ["time_namelookup"]=>
      float(0.016594)
      ["time_connect"]=>
      float(0.014773)
      ["time_appconnect"]=>
      float(0.048044)
      ["time_pretransfer"]=>
      float(6.3000000000007E-5)
      ["time_remoteserver"]=>
      float(0.03837)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.000219)
      ["time_total"]=>
      float(0.118063)
    }
    ["6"]=>
    array(11) {
      ["id"]=>
      int(1160925932)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 18:00:00"
      ["time_namelookup"]=>
      float(0.012792)
      ["time_connect"]=>
      float(0.01454)
      ["time_appconnect"]=>
      float(0.047271)
      ["time_pretransfer"]=>
      float(6.1999999999993E-5)
      ["time_remoteserver"]=>
      float(0.037925)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.00021700000000001)
      ["time_total"]=>
      float(0.112807)
    }
    ["7"]=>
    array(11) {
      ["id"]=>
      int(1160602351)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 17:00:00"
      ["time_namelookup"]=>
      float(0.017301)
      ["time_connect"]=>
      float(0.014362)
      ["time_appconnect"]=>
      float(0.048105)
      ["time_pretransfer"]=>
      float(5.9999999999991E-5)
      ["time_remoteserver"]=>
      float(0.038039)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.000212)
      ["time_total"]=>
      float(0.118079)
    }
    ["8"]=>
    array(11) {
      ["id"]=>
      int(1160278067)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 16:00:00"
      ["time_namelookup"]=>
      float(0.031345)
      ["time_connect"]=>
      float(0.01465)
      ["time_appconnect"]=>
      float(0.046719)
      ["time_pretransfer"]=>
      float(6.2999999999994E-5)
      ["time_remoteserver"]=>
      float(0.037688)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.000226)
      ["time_total"]=>
      float(0.130691)
    }
    ["9"]=>
    array(11) {
      ["id"]=>
      int(1159955378)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 15:00:00"
      ["time_namelookup"]=>
      float(0.018226)
      ["time_connect"]=>
      float(0.015149)
      ["time_appconnect"]=>
      float(0.049648)
      ["time_pretransfer"]=>
      float(6.0000000000004E-5)
      ["time_remoteserver"]=>
      float(0.037913)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.00020999999999999)
      ["time_total"]=>
      float(0.121206)
    }
    ["10"]=>
    array(11) {
      ["id"]=>
      int(1159630736)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 14:00:00"
      ["time_namelookup"]=>
      float(0.01516)
      ["time_connect"]=>
      float(0.01484)
      ["time_appconnect"]=>
      float(0.046033)
      ["time_pretransfer"]=>
      float(6.3999999999995E-5)
      ["time_remoteserver"]=>
      float(0.03705)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.000224)
      ["time_total"]=>
      float(0.113371)
    }
    ["11"]=>
    array(11) {
      ["id"]=>
      int(1159306839)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 13:00:00"
      ["time_namelookup"]=>
      float(0.080494)
      ["time_connect"]=>
      float(0.014812)
      ["time_appconnect"]=>
      float(0.047969)
      ["time_pretransfer"]=>
      float(6.4999999999982E-5)
      ["time_remoteserver"]=>
      float(0.038934)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.00028400000000001)
      ["time_total"]=>
      float(0.182558)
    }
    ["12"]=>
    array(11) {
      ["id"]=>
      int(1158982802)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 12:00:00"
      ["time_namelookup"]=>
      float(0.013445)
      ["time_connect"]=>
      float(0.014586)
      ["time_appconnect"]=>
      float(0.046331)
      ["time_pretransfer"]=>
      float(6.4000000000008E-5)
      ["time_remoteserver"]=>
      float(0.040324)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.000231)
      ["time_total"]=>
      float(0.114981)
    }
    ["13"]=>
    array(11) {
      ["id"]=>
      int(1158661348)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 11:00:00"
      ["time_namelookup"]=>
      float(0.037203)
      ["time_connect"]=>
      float(0.014696)
      ["time_appconnect"]=>
      float(0.047281)
      ["time_pretransfer"]=>
      float(6.6999999999998E-5)
      ["time_remoteserver"]=>
      float(0.040355)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.00022900000000001)
      ["time_total"]=>
      float(0.139831)
    }
    ["14"]=>
    array(11) {
      ["id"]=>
      int(1158337895)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 10:00:00"
      ["time_namelookup"]=>
      float(0.016592)
      ["time_connect"]=>
      float(0.014631)
      ["time_appconnect"]=>
      float(0.04617)
      ["time_pretransfer"]=>
      float(5.899999999999E-5)
      ["time_remoteserver"]=>
      float(0.039697)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.00024299999999999)
      ["time_total"]=>
      float(0.117392)
    }
    ["15"]=>
    array(11) {
      ["id"]=>
      int(1158014995)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 09:00:00"
      ["time_namelookup"]=>
      float(0.030121)
      ["time_connect"]=>
      float(0.014439)
      ["time_appconnect"]=>
      float(0.045655)
      ["time_pretransfer"]=>
      float(6.0999999999992E-5)
      ["time_remoteserver"]=>
      float(0.038925)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.00021099999999999)
      ["time_total"]=>
      float(0.129412)
    }
    ["16"]=>
    array(11) {
      ["id"]=>
      int(1157730305)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 08:00:00"
      ["time_namelookup"]=>
      float(0.020209)
      ["time_connect"]=>
      float(0.015913)
      ["time_appconnect"]=>
      float(0.049618)
      ["time_pretransfer"]=>
      float(5.4999999999999E-5)
      ["time_remoteserver"]=>
      float(0.037951)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.00022900000000001)
      ["time_total"]=>
      float(0.123975)
    }
    ["17"]=>
    array(11) {
      ["id"]=>
      int(1157370440)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 07:00:00"
      ["time_namelookup"]=>
      float(0.014762)
      ["time_connect"]=>
      float(0.014315)
      ["time_appconnect"]=>
      float(0.044328)
      ["time_pretransfer"]=>
      float(6.1000000000005E-5)
      ["time_remoteserver"]=>
      float(0.038253)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.000254)
      ["time_total"]=>
      float(0.111973)
    }
    ["18"]=>
    array(11) {
      ["id"]=>
      int(1157047937)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 06:00:00"
      ["time_namelookup"]=>
      float(0.018062)
      ["time_connect"]=>
      float(0.014588)
      ["time_appconnect"]=>
      float(0.046076)
      ["time_pretransfer"]=>
      float(6.6999999999998E-5)
      ["time_remoteserver"]=>
      float(0.037642)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.00021700000000001)
      ["time_total"]=>
      float(0.116652)
    }
    ["19"]=>
    array(11) {
      ["id"]=>
      int(1156724148)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 05:00:00"
      ["time_namelookup"]=>
      float(0.013463)
      ["time_connect"]=>
      float(0.014481)
      ["time_appconnect"]=>
      float(0.0462)
      ["time_pretransfer"]=>
      float(6.2999999999994E-5)
      ["time_remoteserver"]=>
      float(0.036759)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.00020600000000001)
      ["time_total"]=>
      float(0.111172)
    }
    ["20"]=>
    array(11) {
      ["id"]=>
      int(1156403239)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 04:00:00"
      ["time_namelookup"]=>
      float(0.048274)
      ["time_connect"]=>
      float(0.014586)
      ["time_appconnect"]=>
      float(0.044043)
      ["time_pretransfer"]=>
      float(5.7000000000001E-5)
      ["time_remoteserver"]=>
      float(0.03761)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.00020999999999999)
      ["time_total"]=>
      float(0.14478)
    }
    ["21"]=>
    array(11) {
      ["id"]=>
      int(1156080678)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 03:00:00"
      ["time_namelookup"]=>
      float(0.011763)
      ["time_connect"]=>
      float(0.014587)
      ["time_appconnect"]=>
      float(0.045624)
      ["time_pretransfer"]=>
      float(6.9E-5)
      ["time_remoteserver"]=>
      float(0.038051)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.00021400000000001)
      ["time_total"]=>
      float(0.110308)
    }
    ["22"]=>
    array(11) {
      ["id"]=>
      int(1155757642)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 02:00:00"
      ["time_namelookup"]=>
      float(0.019424)
      ["time_connect"]=>
      float(0.014405)
      ["time_appconnect"]=>
      float(0.046653)
      ["time_pretransfer"]=>
      float(6.1000000000005E-5)
      ["time_remoteserver"]=>
      float(0.037825)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.000211)
      ["time_total"]=>
      float(0.118579)
    }
    ["23"]=>
    array(11) {
      ["id"]=>
      int(1155436363)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 01:00:00"
      ["time_namelookup"]=>
      float(0.015646)
      ["time_connect"]=>
      float(0.014643)
      ["time_appconnect"]=>
      float(0.045531)
      ["time_pretransfer"]=>
      float(5.6E-5)
      ["time_remoteserver"]=>
      float(0.037469)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.00021599999999999)
      ["time_total"]=>
      float(0.113561)
    }
    ["24"]=>
    array(11) {
      ["id"]=>
      int(1155112330)
      ["site_id"]=>
      int(11590)
      ["created_at"]=>
      string(19) "2020-10-01 00:00:00"
      ["time_namelookup"]=>
      float(0.044465)
      ["time_connect"]=>
      float(0.014311)
      ["time_appconnect"]=>
      float(0.046225)
      ["time_pretransfer"]=>
      float(6.3000000000007E-5)
      ["time_remoteserver"]=>
      float(0.038364)
      ["time_redirect"]=>
      int(0)
      ["time_download"]=>
      float(0.00028900000000001)
      ["time_total"]=>
      float(0.143717)
    }
  }
  ["links"]=>
  object(OhDear\PhpSdk\Resources\PerformanceRecord)#58 (7) {
    ["id"]=>
    uninitialized(int)
    ["siteId"]=>
    uninitialized(int)
    ["timeNamelookup"]=>
    uninitialized(int)
    ["timeConnect"]=>
    NULL
    ["timeAppconnect"]=>
    uninitialized(int)
    ["timeRemoteserver"]=>
    uninitialized(int)
    ["timeTotal"]=>
    uninitialized(int)
    ["attributes"]=>
    array(4) {
      ["first"]=>
      string(162) "https://ohdear.app/api/sites/11590/performance-records?filter%5Bstart%5D=20201001000000&filter%5Bend%5D=20201002000000&filter%5Btimeframe%5D=1h&page%5Bnumber%5D=1"
      ["last"]=>
      string(162) "https://ohdear.app/api/sites/11590/performance-records?filter%5Bstart%5D=20201001000000&filter%5Bend%5D=20201002000000&filter%5Btimeframe%5D=1h&page%5Bnumber%5D=1"
      ["prev"]=>
      NULL
      ["next"]=>
      NULL
    }
    ["ohDear":protected]=>
    object(OhDear\PhpSdk\OhDear)#25 (2) {
      ["apiToken"]=>
      string(60) "REDACTED"
      ["client"]=>
      object(GuzzleHttp\Client)#26 (1) {
        ["config":"GuzzleHttp\Client":private]=>
        array(9) {
          ["base_uri"]=>
          object(GuzzleHttp\Psr7\Uri)#39 (7) {
            ["scheme":"GuzzleHttp\Psr7\Uri":private]=>
            string(5) "https"
            ["userInfo":"GuzzleHttp\Psr7\Uri":private]=>
            string(0) ""
            ["host":"GuzzleHttp\Psr7\Uri":private]=>
            string(10) "ohdear.app"
            ["port":"GuzzleHttp\Psr7\Uri":private]=>
            NULL
            ["path":"GuzzleHttp\Psr7\Uri":private]=>
            string(5) "/api/"
            ["query":"GuzzleHttp\Psr7\Uri":private]=>
            string(0) ""
            ["fragment":"GuzzleHttp\Psr7\Uri":private]=>
            string(0) ""
          }
          ["http_errors"]=>
          bool(false)
          ["verify"]=>
          bool(false)
          ["headers"]=>
          array(4) {
            ["Authorization"]=>
            string(67) "Bearer REDACTED"
            ["Accept"]=>
            string(16) "application/json"
            ["Content-Type"]=>
            string(16) "application/json"
            ["User-Agent"]=>
            string(12) "GuzzleHttp/7"
          }
          ["handler"]=>
          object(GuzzleHttp\HandlerStack)#27 (3) {
            ["handler":"GuzzleHttp\HandlerStack":private]=>
            object(Closure)#34 (2) {
              ["static"]=>
              array(2) {
                ["default"]=>
                object(Closure)#32 (2) {
                  ["static"]=>
                  array(2) {
                    ["default"]=>
                    object(GuzzleHttp\Handler\CurlMultiHandler)#28 (6) {
                      ["factory":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      object(GuzzleHttp\Handler\CurlFactory)#29 (2) {
                        ["handles":"GuzzleHttp\Handler\CurlFactory":private]=>
                        array(0) {
                        }
                        ["maxHandles":"GuzzleHttp\Handler\CurlFactory":private]=>
                        int(50)
                      }
                      ["selectTimeout":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      int(1)
                      ["active":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      NULL
                      ["handles":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      array(0) {
                      }
                      ["delays":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      array(0) {
                      }
                      ["options":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      array(0) {
                      }
                    }
                    ["sync"]=>
                    object(GuzzleHttp\Handler\CurlHandler)#30 (1) {
                      ["factory":"GuzzleHttp\Handler\CurlHandler":private]=>
                      object(GuzzleHttp\Handler\CurlFactory)#31 (2) {
                        ["handles":"GuzzleHttp\Handler\CurlFactory":private]=>
                        array(1) {
                          [0]=>
                          resource(137) of type (curl)
                        }
                        ["maxHandles":"GuzzleHttp\Handler\CurlFactory":private]=>
                        int(3)
                      }
                    }
                  }
                  ["parameter"]=>
                  array(2) {
                    ["$request"]=>
                    string(10) "<required>"
                    ["$options"]=>
                    string(10) "<required>"
                  }
                }
                ["streaming"]=>
                object(GuzzleHttp\Handler\StreamHandler)#33 (1) {
                  ["lastHeaders":"GuzzleHttp\Handler\StreamHandler":private]=>
                  array(0) {
                  }
                }
              }
              ["parameter"]=>
              array(2) {
                ["$request"]=>
                string(10) "<required>"
                ["$options"]=>
                string(10) "<required>"
              }
            }
            ["stack":"GuzzleHttp\HandlerStack":private]=>
            array(4) {
              [0]=>
              array(2) {
                [0]=>
                object(Closure)#35 (2) {
                  ["static"]=>
                  array(1) {
                    ["bodySummarizer"]=>
                    NULL
                  }
                  ["parameter"]=>
                  array(1) {
                    ["$handler"]=>
                    string(10) "<required>"
                  }
                }
                [1]=>
                string(11) "http_errors"
              }
              [1]=>
              array(2) {
                [0]=>
                object(Closure)#36 (1) {
                  ["parameter"]=>
                  array(1) {
                    ["$handler"]=>
                    string(10) "<required>"
                  }
                }
                [1]=>
                string(15) "allow_redirects"
              }
              [2]=>
              array(2) {
                [0]=>
                object(Closure)#37 (1) {
                  ["parameter"]=>
                  array(1) {
                    ["$handler"]=>
                    string(10) "<required>"
                  }
                }
                [1]=>
                string(7) "cookies"
              }
              [3]=>
              array(2) {
                [0]=>
                object(Closure)#38 (1) {
                  ["parameter"]=>
                  array(1) {
                    ["$handler"]=>
                    string(10) "<required>"
                  }
                }
                [1]=>
                string(12) "prepare_body"
              }
            }
            ["cached":"GuzzleHttp\HandlerStack":private]=>
            object(Closure)#47 (2) {
              ["static"]=>
              array(2) {
                ["handler"]=>
                object(GuzzleHttp\RedirectMiddleware)#46 (1) {
                  ["nextHandler":"GuzzleHttp\RedirectMiddleware":private]=>
                  object(Closure)#45 (2) {
                    ["static"]=>
                    array(1) {
                      ["handler"]=>
                      object(GuzzleHttp\PrepareBodyMiddleware)#42 (1) {
                        ["nextHandler":"GuzzleHttp\PrepareBodyMiddleware":private]=>
                        object(Closure)#34 (2) {
                          ["static"]=>
                          array(2) {
                            ["default"]=>
                            object(Closure)#32 (2) {
                              ["static"]=>
                              array(2) {
                                ["default"]=>
                                object(GuzzleHttp\Handler\CurlMultiHandler)#28 (6) {
                                  ["factory":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  object(GuzzleHttp\Handler\CurlFactory)#29 (2) {
                                    ["handles":"GuzzleHttp\Handler\CurlFactory":private]=>
                                    array(0) {
                                    }
                                    ["maxHandles":"GuzzleHttp\Handler\CurlFactory":private]=>
                                    int(50)
                                  }
                                  ["selectTimeout":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  int(1)
                                  ["active":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  NULL
                                  ["handles":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  array(0) {
                                  }
                                  ["delays":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  array(0) {
                                  }
                                  ["options":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  array(0) {
                                  }
                                }
                                ["sync"]=>
                                object(GuzzleHttp\Handler\CurlHandler)#30 (1) {
                                  ["factory":"GuzzleHttp\Handler\CurlHandler":private]=>
                                  object(GuzzleHttp\Handler\CurlFactory)#31 (2) {
                                    ["handles":"GuzzleHttp\Handler\CurlFactory":private]=>
                                    array(1) {
                                      [0]=>
                                      resource(137) of type (curl)
                                    }
                                    ["maxHandles":"GuzzleHttp\Handler\CurlFactory":private]=>
                                    int(3)
                                  }
                                }
                              }
                              ["parameter"]=>
                              array(2) {
                                ["$request"]=>
                                string(10) "<required>"
                                ["$options"]=>
                                string(10) "<required>"
                              }
                            }
                            ["streaming"]=>
                            object(GuzzleHttp\Handler\StreamHandler)#33 (1) {
                              ["lastHeaders":"GuzzleHttp\Handler\StreamHandler":private]=>
                              array(0) {
                              }
                            }
                          }
                          ["parameter"]=>
                          array(2) {
                            ["$request"]=>
                            string(10) "<required>"
                            ["$options"]=>
                            string(10) "<required>"
                          }
                        }
                      }
                    }
                    ["parameter"]=>
                    array(2) {
                      ["$request"]=>
                      string(10) "<required>"
                      ["$options"]=>
                      string(10) "<required>"
                    }
                  }
                }
                ["bodySummarizer"]=>
                NULL
              }
              ["parameter"]=>
              array(2) {
                ["$request"]=>
                string(10) "<required>"
                ["$options"]=>
                string(10) "<required>"
              }
            }
          }
          ["allow_redirects"]=>
          array(5) {
            ["max"]=>
            int(5)
            ["protocols"]=>
            array(2) {
              [0]=>
              string(4) "http"
              [1]=>
              string(5) "https"
            }
            ["strict"]=>
            bool(false)
            ["referer"]=>
            bool(false)
            ["track_redirects"]=>
            bool(false)
          }
          ["decode_content"]=>
          bool(true)
          ["cookies"]=>
          bool(false)
          ["idn_conversion"]=>
          bool(false)
        }
      }
    }
    ["first"]=>
    string(162) "https://ohdear.app/api/sites/11590/performance-records?filter%5Bstart%5D=20201001000000&filter%5Bend%5D=20201002000000&filter%5Btimeframe%5D=1h&page%5Bnumber%5D=1"
    ["last"]=>
    string(162) "https://ohdear.app/api/sites/11590/performance-records?filter%5Bstart%5D=20201001000000&filter%5Bend%5D=20201002000000&filter%5Btimeframe%5D=1h&page%5Bnumber%5D=1"
    ["prev"]=>
    NULL
    ["next"]=>
    NULL
  }
  ["meta"]=>
  object(OhDear\PhpSdk\Resources\PerformanceRecord)#57 (11) {
    ["id"]=>
    uninitialized(int)
    ["siteId"]=>
    uninitialized(int)
    ["timeNamelookup"]=>
    uninitialized(int)
    ["timeConnect"]=>
    NULL
    ["timeAppconnect"]=>
    uninitialized(int)
    ["timeRemoteserver"]=>
    uninitialized(int)
    ["timeTotal"]=>
    uninitialized(int)
    ["attributes"]=>
    array(8) {
      ["current_page"]=>
      int(1)
      ["from"]=>
      int(1)
      ["last_page"]=>
      int(1)
      ["links"]=>
      array(3) {
        [0]=>
        array(3) {
          ["url"]=>
          NULL
          ["label"]=>
          string(16) "&laquo; Previous"
          ["active"]=>
          bool(false)
        }
        [1]=>
        array(3) {
          ["url"]=>
          string(162) "https://ohdear.app/api/sites/11590/performance-records?filter%5Bstart%5D=20201001000000&filter%5Bend%5D=20201002000000&filter%5Btimeframe%5D=1h&page%5Bnumber%5D=1"
          ["label"]=>
          int(1)
          ["active"]=>
          bool(true)
        }
        [2]=>
        array(3) {
          ["url"]=>
          NULL
          ["label"]=>
          string(12) "Next &raquo;"
          ["active"]=>
          bool(false)
        }
      }
      ["path"]=>
      string(54) "https://ohdear.app/api/sites/11590/performance-records"
      ["per_page"]=>
      int(200)
      ["to"]=>
      int(25)
      ["total"]=>
      int(25)
    }
    ["ohDear":protected]=>
    object(OhDear\PhpSdk\OhDear)#25 (2) {
      ["apiToken"]=>
      string(60) "REDACTED"
      ["client"]=>
      object(GuzzleHttp\Client)#26 (1) {
        ["config":"GuzzleHttp\Client":private]=>
        array(9) {
          ["base_uri"]=>
          object(GuzzleHttp\Psr7\Uri)#39 (7) {
            ["scheme":"GuzzleHttp\Psr7\Uri":private]=>
            string(5) "https"
            ["userInfo":"GuzzleHttp\Psr7\Uri":private]=>
            string(0) ""
            ["host":"GuzzleHttp\Psr7\Uri":private]=>
            string(10) "ohdear.app"
            ["port":"GuzzleHttp\Psr7\Uri":private]=>
            NULL
            ["path":"GuzzleHttp\Psr7\Uri":private]=>
            string(5) "/api/"
            ["query":"GuzzleHttp\Psr7\Uri":private]=>
            string(0) ""
            ["fragment":"GuzzleHttp\Psr7\Uri":private]=>
            string(0) ""
          }
          ["http_errors"]=>
          bool(false)
          ["verify"]=>
          bool(false)
          ["headers"]=>
          array(4) {
            ["Authorization"]=>
            string(67) "Bearer REDACTED"
            ["Accept"]=>
            string(16) "application/json"
            ["Content-Type"]=>
            string(16) "application/json"
            ["User-Agent"]=>
            string(12) "GuzzleHttp/7"
          }
          ["handler"]=>
          object(GuzzleHttp\HandlerStack)#27 (3) {
            ["handler":"GuzzleHttp\HandlerStack":private]=>
            object(Closure)#34 (2) {
              ["static"]=>
              array(2) {
                ["default"]=>
                object(Closure)#32 (2) {
                  ["static"]=>
                  array(2) {
                    ["default"]=>
                    object(GuzzleHttp\Handler\CurlMultiHandler)#28 (6) {
                      ["factory":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      object(GuzzleHttp\Handler\CurlFactory)#29 (2) {
                        ["handles":"GuzzleHttp\Handler\CurlFactory":private]=>
                        array(0) {
                        }
                        ["maxHandles":"GuzzleHttp\Handler\CurlFactory":private]=>
                        int(50)
                      }
                      ["selectTimeout":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      int(1)
                      ["active":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      NULL
                      ["handles":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      array(0) {
                      }
                      ["delays":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      array(0) {
                      }
                      ["options":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                      array(0) {
                      }
                    }
                    ["sync"]=>
                    object(GuzzleHttp\Handler\CurlHandler)#30 (1) {
                      ["factory":"GuzzleHttp\Handler\CurlHandler":private]=>
                      object(GuzzleHttp\Handler\CurlFactory)#31 (2) {
                        ["handles":"GuzzleHttp\Handler\CurlFactory":private]=>
                        array(1) {
                          [0]=>
                          resource(137) of type (curl)
                        }
                        ["maxHandles":"GuzzleHttp\Handler\CurlFactory":private]=>
                        int(3)
                      }
                    }
                  }
                  ["parameter"]=>
                  array(2) {
                    ["$request"]=>
                    string(10) "<required>"
                    ["$options"]=>
                    string(10) "<required>"
                  }
                }
                ["streaming"]=>
                object(GuzzleHttp\Handler\StreamHandler)#33 (1) {
                  ["lastHeaders":"GuzzleHttp\Handler\StreamHandler":private]=>
                  array(0) {
                  }
                }
              }
              ["parameter"]=>
              array(2) {
                ["$request"]=>
                string(10) "<required>"
                ["$options"]=>
                string(10) "<required>"
              }
            }
            ["stack":"GuzzleHttp\HandlerStack":private]=>
            array(4) {
              [0]=>
              array(2) {
                [0]=>
                object(Closure)#35 (2) {
                  ["static"]=>
                  array(1) {
                    ["bodySummarizer"]=>
                    NULL
                  }
                  ["parameter"]=>
                  array(1) {
                    ["$handler"]=>
                    string(10) "<required>"
                  }
                }
                [1]=>
                string(11) "http_errors"
              }
              [1]=>
              array(2) {
                [0]=>
                object(Closure)#36 (1) {
                  ["parameter"]=>
                  array(1) {
                    ["$handler"]=>
                    string(10) "<required>"
                  }
                }
                [1]=>
                string(15) "allow_redirects"
              }
              [2]=>
              array(2) {
                [0]=>
                object(Closure)#37 (1) {
                  ["parameter"]=>
                  array(1) {
                    ["$handler"]=>
                    string(10) "<required>"
                  }
                }
                [1]=>
                string(7) "cookies"
              }
              [3]=>
              array(2) {
                [0]=>
                object(Closure)#38 (1) {
                  ["parameter"]=>
                  array(1) {
                    ["$handler"]=>
                    string(10) "<required>"
                  }
                }
                [1]=>
                string(12) "prepare_body"
              }
            }
            ["cached":"GuzzleHttp\HandlerStack":private]=>
            object(Closure)#47 (2) {
              ["static"]=>
              array(2) {
                ["handler"]=>
                object(GuzzleHttp\RedirectMiddleware)#46 (1) {
                  ["nextHandler":"GuzzleHttp\RedirectMiddleware":private]=>
                  object(Closure)#45 (2) {
                    ["static"]=>
                    array(1) {
                      ["handler"]=>
                      object(GuzzleHttp\PrepareBodyMiddleware)#42 (1) {
                        ["nextHandler":"GuzzleHttp\PrepareBodyMiddleware":private]=>
                        object(Closure)#34 (2) {
                          ["static"]=>
                          array(2) {
                            ["default"]=>
                            object(Closure)#32 (2) {
                              ["static"]=>
                              array(2) {
                                ["default"]=>
                                object(GuzzleHttp\Handler\CurlMultiHandler)#28 (6) {
                                  ["factory":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  object(GuzzleHttp\Handler\CurlFactory)#29 (2) {
                                    ["handles":"GuzzleHttp\Handler\CurlFactory":private]=>
                                    array(0) {
                                    }
                                    ["maxHandles":"GuzzleHttp\Handler\CurlFactory":private]=>
                                    int(50)
                                  }
                                  ["selectTimeout":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  int(1)
                                  ["active":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  NULL
                                  ["handles":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  array(0) {
                                  }
                                  ["delays":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  array(0) {
                                  }
                                  ["options":"GuzzleHttp\Handler\CurlMultiHandler":private]=>
                                  array(0) {
                                  }
                                }
                                ["sync"]=>
                                object(GuzzleHttp\Handler\CurlHandler)#30 (1) {
                                  ["factory":"GuzzleHttp\Handler\CurlHandler":private]=>
                                  object(GuzzleHttp\Handler\CurlFactory)#31 (2) {
                                    ["handles":"GuzzleHttp\Handler\CurlFactory":private]=>
                                    array(1) {
                                      [0]=>
                                      resource(137) of type (curl)
                                    }
                                    ["maxHandles":"GuzzleHttp\Handler\CurlFactory":private]=>
                                    int(3)
                                  }
                                }
                              }
                              ["parameter"]=>
                              array(2) {
                                ["$request"]=>
                                string(10) "<required>"
                                ["$options"]=>
                                string(10) "<required>"
                              }
                            }
                            ["streaming"]=>
                            object(GuzzleHttp\Handler\StreamHandler)#33 (1) {
                              ["lastHeaders":"GuzzleHttp\Handler\StreamHandler":private]=>
                              array(0) {
                              }
                            }
                          }
                          ["parameter"]=>
                          array(2) {
                            ["$request"]=>
                            string(10) "<required>"
                            ["$options"]=>
                            string(10) "<required>"
                          }
                        }
                      }
                    }
                    ["parameter"]=>
                    array(2) {
                      ["$request"]=>
                      string(10) "<required>"
                      ["$options"]=>
                      string(10) "<required>"
                    }
                  }
                }
                ["bodySummarizer"]=>
                NULL
              }
              ["parameter"]=>
              array(2) {
                ["$request"]=>
                string(10) "<required>"
                ["$options"]=>
                string(10) "<required>"
              }
            }
          }
          ["allow_redirects"]=>
          array(5) {
            ["max"]=>
            int(5)
            ["protocols"]=>
            array(2) {
              [0]=>
              string(4) "http"
              [1]=>
              string(5) "https"
            }
            ["strict"]=>
            bool(false)
            ["referer"]=>
            bool(false)
            ["track_redirects"]=>
            bool(false)
          }
          ["decode_content"]=>
          bool(true)
          ["cookies"]=>
          bool(false)
          ["idn_conversion"]=>
          bool(false)
        }
      }
    }
    ["currentPage"]=>
    int(1)
    ["from"]=>
    int(1)
    ["lastPage"]=>
    int(1)
    ["links"]=>
    array(3) {
      [0]=>
      array(3) {
        ["url"]=>
        NULL
        ["label"]=>
        string(16) "&laquo; Previous"
        ["active"]=>
        bool(false)
      }
      [1]=>
      array(3) {
        ["url"]=>
        string(162) "https://ohdear.app/api/sites/11590/performance-records?filter%5Bstart%5D=20201001000000&filter%5Bend%5D=20201002000000&filter%5Btimeframe%5D=1h&page%5Bnumber%5D=1"
        ["label"]=>
        int(1)
        ["active"]=>
        bool(true)
      }
      [2]=>
      array(3) {
        ["url"]=>
        NULL
        ["label"]=>
        string(12) "Next &raquo;"
        ["active"]=>
        bool(false)
      }
    }
    ["path"]=>
    string(54) "https://ohdear.app/api/sites/11590/performance-records"
    ["perPage"]=>
    int(200)
    ["to"]=>
    int(25)
    ["total"]=>
    int(25)
  }
}

Conflicting packages

I'm keep getting this, when installing;

  Problem 1
    - Root composer.json requires webhubworks/craft-ohdear 1.2.2 -> satisfiable by webhubworks/craft-ohdear[v1.2.2].
    - webhubworks/craft-ohdear v1.2.2 requires ohdearapp/ohdear-php-sdk ^1.6.0 -> found ohdearapp/ohdear-php-sdk[1.6.0, ..., 1.10.0] but it conflicts with your root composer.json require (^3.4).

But when I look in composer.json, it says it requires ohdearapp/ohdear-php-sdk ^3.4.0, so I am confused why this is not working.

How can I solve this?

Get status page error

When I try to get a specific status page like this :

        $this->ohDear->statusPage(config('ohdear.status_page_id'));

I get this error : Cannot assign null to property OhDear\PhpSdk\Resources\StatusPage::$domain of type string

In fact the StatusPage model has a string property $domain that can't be null.
Can you make it nullable as the API can return null in this value. Maybe it is the case for other attributes ?

Language not supported

Actually we can't get results from several APIs in the relevant language.
For example we add a status update in four languages in the oh dear dashboard. Then we can't get this status page update in the wanted language (for example french)).

It could be great if a header "Accept-Language " can be handled by ohdear API.

Validation Exception - The description must be a string.

I am using the laravel schedule monitor with the --keep-old method to push my cron jobs for monitoring to Oh Dear, however, there seems to be a validation issue where the description is not being validated as a string even though an empty string is passed. You can see that the description param is set to an empty string here:

https://github.com/spatie/laravel-schedule-monitor/blob/682df2ecd3a4085740dffce984f8c1b1892c2a0d/src/Commands/SyncCommand.php#L157

But I still receive a validation error from Oh Dear:

https://jasara-tech.sentry.io/share/issue/4ec55a7a053949d783f4e9e5b29cc433/

Not sure if this is a package issue or server issue, so let me know if this should be brought up somewhere else.

$check->requestRun() not working

When retrieving all checks from a site and requesting a run nothing happens:

foreach($site->checks as $check){
  $check->requestRun();
}

It seems that the method body of requestRun() in class Check is empty.

I guess it should be something like:

public function requestRun()
{
  $updatedCheck = $this->ohDear->requestRun($this->id);

  $this->enabled = $updatedCheck->enabled;
}

Exception message could be more descriptive for post to cron-checks/sync

I was using the spatie/laravel-schedule-monitor and had an exception returned with a message that just says "Server Error". After some guessing I discovered it seemed to be due to having a cron name that was too long. I was able to solve me issue by shortening the name but it would have been helpful if the exception pointed me towards that rather than guessing what could be causing a Server Error.

The exception is thrown here.
https://github.com/ohdearapp/ohdear-php-sdk/blob/main/src/MakesHttpRequests.php#L73

Exception for uptime check when no data is there as site is too new

OhDear\PhpSdk\OhDear::transformCollection(): Argument #1 ($collection) must be of type array, string given, called in `/vendor/ohdearapp/ohdear-php-sdk/src/Actions/ManagesUptime.php` on line 16

		$uptime = $ohdear->site($id)->uptime(
			date('Ymdhis', strtotime("-1 year")),
			date('Ymdhis'),
			'day'
		);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.