Exemplo n.º 1
0
 public function sendEmail($subject, $body, $to, $attachments = null, $html)
 {
     if (!is_array($to)) {
         $to = [$to];
     }
     $data = ["subject" => $subject, "to" => $to];
     if ($html) {
         $data["bodyparts"] = ["htmlmessage" => $body];
     } else {
         $data["bodyparts"] = ["textmessage" => $body];
     }
     if ($attachments !== null) {
         $data["attachment"] = $attachments;
     }
     return RequestBuilder::doRequestByUrl(Backendless::getUrl() . "/" . Backendless::getVersion() . "/messaging/email", $data, 'POST');
 }
Exemplo n.º 2
0
 public function reset($counter_name)
 {
     RequestBuilder::doRequestByUrl(Backendless::getUrl() . "/" . Backendless::getVersion() . "/counters/" . $counter_name . "/reset", '', 'PUT');
 }
Exemplo n.º 3
0
 public function dispatch($event_name, $event_args_array = null)
 {
     return RequestBuilder::doRequestByUrl(Backendless::getUrl() . "/" . Backendless::getVersion() . "/servercode/events/" . $event_name, $event_args_array, 'POST');
 }
Exemplo n.º 4
0
 public function expireAt($key, $timestamp)
 {
     $timestamp = $timestamp * 1000;
     RequestBuilder::doRequestByUrl(Backendless::getUrl() . "/" . Backendless::getVersion() . "/cache/" . $key . "expireAt?timestamp=" . $timestamp, '', 'PUT');
 }
Exemplo n.º 5
0
 public function retrivePageByUrl($url)
 {
     return RequestBuilder::doRequestByUrl($url, null, 'GET');
 }