Exemplo n.º 1
0
 public function restorePassword($identity)
 {
     if (!isset($identity) || $identity == null) {
         throw new BackendlessException("Identity cannot be null");
     } else {
         RequestBuilder::doRequest('users', 'restorepassword/' . urlencode($identity), null, 'GET');
     }
 }
Exemplo n.º 2
0
 public function writeLog($message, $type)
 {
     $log_data = [];
     $log_data[0] = [];
     $log_data[0]["log-level"] = $type;
     $log_data[0]["logger"] = $this->getName();
     $log_data[0]["timestamp"] = time();
     $log_data[0]["message"] = $message;
     $log_data[0]["exception"] = "";
     RequestBuilder::doRequest('log', null, $log_data, 'PUT');
 }
Exemplo n.º 3
0
 public function exists($file_path)
 {
     $file_path = trim($file_path);
     $file_path = trim($file_path, "\\\\/");
     if (empty($file_path)) {
         throw new Exception("File path variable empty");
     }
     return RequestBuilder::doRequest('files/exists', $file_path, '', 'GET');
 }
Exemplo n.º 4
0
 public function resendEmailConfirmation($email_address)
 {
     RequestBuilder::doRequest('users', 'resendconfirmation?email=' . $email_address, null, 'POST');
 }
Exemplo n.º 5
0
 public function describe($entity_name)
 {
     return RequestBuilder::doRequest('data', $entity_name . "/properties", null, 'GET');
 }
Exemplo n.º 6
0
 public function getGeoFencePoints($geofence_name, $geo_query)
 {
     $url = "points?geoFence=" . $geofence_name;
     $url_part = $geo_query->buildCategoryUrl();
     if (strlen($url_part) > 0) {
         $url .= "&" . $url_part;
     }
     return new BackendlessCollection(RequestBuilder::doRequest('geo', $url, null, 'GET')['collection']);
 }