public function addCheck($check, $defaults = array()) {
    $this->ensureParameters(array(
      'name' => $check['name'],
      'host' => $check['host'],
      'url' => $check['url'],
    ), __METHOD__);
    $check += $defaults;
    $data = $this->request('POST', 'checks', $check);
    return sprintf('Created check %s for %s at http://%s%s', $data->check->id, $check['name'], $check['host'], $check['url']);
  }
public function addCheck($check, $defaults = array()) {
    $this->ensureParameters(array(
      'name' => $check['name'],
      'host' => $check['host'],
      'url' => $check['url'],
    ), __METHOD__);
    $check += $defaults;
    $data = $this->request('POST', 'checks', $check);
    return sprintf('Created check %s for %s at http://%s%s', $data->check->id, $check['name'], $check['host'], $check['url']);
  }
public function addCheck ( $ check , $ defaults = array ( ) ) { $ this -> ensureParameters ( array ( 'name' => $ check [ 'name' ] , 'host' => $ check [ 'host' ] , 'url' => $ check [ 'url' ] , ) , __METHOD__ ) ; $ check += $ defaults ; $ data = $ this -> request ( 'POST' , 'checks' , $ check ) ; return sprintf ( 'Created check %s for %s at http://%s%s' , $ data -> check -> id , $ check [ 'name' ] , $ check [ 'host' ] , $ check [ 'url' ] ) ; }
Adds a new check.

@param array $check
An array representing the check to create. The only required properties
are "name" and "host", default values for the other properties will be
assumed if not explicitly provided.
@param array $defaults
An array of default settings for the check.

@return string
A success message.
Adds a new check .