<?php
namespace SHServ\Routes;
trait RESTAPI_v1 {
protected function restapi_uri_routes() {
$this -> router -> uri("/api/v1/devices/scanning/setup", "{$this -> cn}\\DevicesRESTAPIController@scanning__ready_to_setup");
$this -> router -> uri("/api/v1/devices/scanning/all", "{$this -> cn}\\DevicesRESTAPIController@scanning__all");
$this -> router -> uri('/api/v1/devices/remove/$device_id', "{$this -> cn}\\DevicesRESTAPIController@remove_device");
}
protected function restapi_get_routes() {
}
protected function restapi_post_routes() {
$this -> router -> post(
[ "event_name", "device_id", "data"],
"{$this -> cn}\\DevicesRESTAPIController@setup_new_device",
"/api/v1/devices/setup/new-device"
);
}
}