Newer
Older
smart-home-server / server / SHServ / Routes / ScriptsRESTAPI_v1.php
<?php

namespace SHServ\Routes;

trait ScriptsRESTAPI_v1 {
	protected function scripts_restapi_uri_routes() {
		$this -> router -> uri("/api/v1/scripts/actions/list", "{$this -> cn}\\ScriptsRESTAPIController@actions_scripts_list");
	}

	protected function scripts_restapi_post_routes() {
		$this -> router -> post(
			[ "alias", "params" ],
			"{$this -> cn}\\ScriptsRESTAPIController@run_action_script",
			'/api/v1/scripts/actions/run'
		);

	}

	protected function scripts_restapi_get_routes() {
	
	}
}