|
@@ -23,13 +23,17 @@ class SmartESL
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Request to label(s) its properties
|
|
* Request to label(s) its properties
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param bool $force request directly to ESL
|
|
|
* @return null|object Details
|
|
* @return null|object Details
|
|
|
*/
|
|
*/
|
|
|
- public function GetStatus()
|
|
|
|
|
|
|
+ public function GetStatus(bool $force = false)
|
|
|
{
|
|
{
|
|
|
- $labels = json_encode(array($this->labels));
|
|
|
|
|
- $URI = "/1.0.0/index.php/smartesl.getstatus/3.1.0/";
|
|
|
|
|
- $ret = $this->core->CallAPI($URI, $labels);
|
|
|
|
|
|
|
+ $labels = json_encode($this->labels);
|
|
|
|
|
+ //$URI = "/1.0.0/index.php/smartesl.getstatus/3.1.0/";
|
|
|
|
|
+ $forceStr = var_export($force, true);
|
|
|
|
|
+ $URI = "/1.0.0/index.php/smartesl.getstatus/4.0.0/[{$labels},{$forceStr}]";
|
|
|
|
|
+ $ret = $this->core->CallAPI($URI, '');
|
|
|
if ($ret['err'] == 0 && $ret['value']['code'] == 0) {
|
|
if ($ret['err'] == 0 && $ret['value']['code'] == 0) {
|
|
|
// Update current properties
|
|
// Update current properties
|
|
|
$this->labelProperties = $ret['value']['value'];
|
|
$this->labelProperties = $ret['value']['value'];
|
|
@@ -38,16 +42,6 @@ class SmartESL
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * Retrieve cached label properties
|
|
|
|
|
- *
|
|
|
|
|
- * @return null|object
|
|
|
|
|
- */
|
|
|
|
|
- public function getDetails()
|
|
|
|
|
- {
|
|
|
|
|
- return $this->labelProperties;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* Get label version splitted into the three components major, minor, patch
|
|
* Get label version splitted into the three components major, minor, patch
|
|
|
*
|
|
*
|