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'); }
public function reset($counter_name) { RequestBuilder::doRequestByUrl(Backendless::getUrl() . "/" . Backendless::getVersion() . "/counters/" . $counter_name . "/reset", '', 'PUT'); }
public function dispatch($event_name, $event_args_array = null) { return RequestBuilder::doRequestByUrl(Backendless::getUrl() . "/" . Backendless::getVersion() . "/servercode/events/" . $event_name, $event_args_array, 'POST'); }
public function expireAt($key, $timestamp) { $timestamp = $timestamp * 1000; RequestBuilder::doRequestByUrl(Backendless::getUrl() . "/" . Backendless::getVersion() . "/cache/" . $key . "expireAt?timestamp=" . $timestamp, '', 'PUT'); }
public function retrivePageByUrl($url) { return RequestBuilder::doRequestByUrl($url, null, 'GET'); }