Skip to content

Commit 4eeaaff

Browse files
committed
added API->getInstanceByUUID(<uuid>) (fix: #13)
1 parent a69d646 commit 4eeaaff

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/API.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,4 +467,15 @@ public function __construct($url = 'http://127.0.0.1:8087', $timeout = 8000)
467467
$this->url = $url;
468468
$this->timeout = $timeout;
469469
}
470+
/**
471+
* getInstanceByUUID
472+
*
473+
* @param string $uuid SinusBot instance UUID
474+
* @return Instance
475+
*/
476+
public function getInstanceByUUID($uuid) {
477+
$instance = $this->request("/bot/i/".$uuid."/settings");
478+
$instance['uuid'] = $uuid;
479+
return new Instance($this->token, $this->url, $this->timeout, $instance);
480+
}
470481
}

0 commit comments

Comments
 (0)