src/wormling/phparia/Api/Asterisk.php 1 location
|
@@ 172-179 (lines=8) @@
|
169 |
|
* @throws NotFoundException |
170 |
|
* @throws ConflictException |
171 |
|
*/ |
172 |
|
public function getModule($moduleName) |
173 |
|
{ |
174 |
|
$uri = "asterisk/module/$moduleName"; |
175 |
|
|
176 |
|
$response = $this->client->getEndpoint()->get($uri); |
177 |
|
|
178 |
|
return new Module(\GuzzleHttp\json_decode($response->getBody())); |
179 |
|
} |
180 |
|
|
181 |
|
/** |
182 |
|
* Load an Asterisk module. |
src/wormling/phparia/Api/DeviceStates.php 1 location
|
@@ 68-74 (lines=7) @@
|
65 |
|
* @param string $deviceName |
66 |
|
* @return DeviceState |
67 |
|
*/ |
68 |
|
public function getDeviceState($deviceName) |
69 |
|
{ |
70 |
|
$uri = "deviceStates/$deviceName"; |
71 |
|
$response = $this->client->getEndpoint()->get($uri); |
72 |
|
|
73 |
|
return new DeviceState($this->client, \GuzzleHttp\json_decode($response->getBody())); |
74 |
|
} |
75 |
|
|
76 |
|
/** |
77 |
|
* Change the state of a device controlled by ARI. (Note - implicitly creates the device state). |
src/wormling/phparia/Api/Sounds.php 1 location
|
@@ 55-61 (lines=7) @@
|
52 |
|
* @param string $soundId Sound's id |
53 |
|
* @return Sound |
54 |
|
*/ |
55 |
|
public function getSound($soundId) |
56 |
|
{ |
57 |
|
$uri = "sounds/$soundId"; |
58 |
|
$response = $this->client->getEndpoint()->get($uri); |
59 |
|
|
60 |
|
return new Sound(\GuzzleHttp\json_decode($response->getBody())); |
61 |
|
} |
62 |
|
} |
63 |
|
|