<?php

namespace SHServ\Tools\DeviceAPI\TestActions;

use \SHServ\Tools\DeviceAPI\Base;


trait Base_test {
	public function device_api_base__about() {
		$device_base_api = new Base("192.168.68.2");
		$about = $device_base_api -> get_about();

		echo "<pre>";
		var_dump($about);
	}

	public function device_api_base__set_token() {
		$device_base_api = new Base("192.168.68.5");
		$result = $device_base_api -> remote_set_token("mytoken123");

		echo "<pre>";
		var_dump($result);
	}

	public function device_api_base__reboot() {
		$device_base_api = new Base("192.168.68.7", "mytoken123");
		$result = $device_base_api -> reboot();

		echo "<pre>";
		var_dump($result);
	}

	public function device_api_base__post_action() {
		$device_base_api = new Base("192.168.68.7", "mytoken123");
		$result = $device_base_api -> post_action("toggle_channel", ["channel" => 0]);

		echo "<pre>";
		var_dump($result);
	}

	public function device_api_base__set_device_name() {
		$device_base_api = new Base("192.168.68.7", "mytoken123");
		$result = $device_base_api -> set_device_name("Dev Sample");

		echo "<pre>";
		var_dump($result);
	}

	public function device_api_base__reset() {
		$device_base_api = new Base("192.168.68.5", "5e1627a855b0a140");
		$result = $device_base_api -> reset();

		echo "<pre>";
		var_dump($result);
	}
}