| @@ 20-29 (lines=10) @@ | ||
| 17 | * @param string $uniqueId The device unique ID. |
|
| 18 | * @return Device |
|
| 19 | */ |
|
| 20 | public function getDevice($uniqueId) |
|
| 21 | { |
|
| 22 | try { |
|
| 23 | $response = $this->client->get('/device/'.$uniqueId); |
|
| 24 | ||
| 25 | return $this->serializer->deserialize($response->getBody(), DeviceModel::class, 'json'); |
|
| 26 | } catch (ClientException $e) { |
|
| 27 | throw $this->createApiException($e); |
|
| 28 | } |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * Update devices. |
|
| @@ 20-29 (lines=10) @@ | ||
| 17 | * @param string $id The manager UUID. |
|
| 18 | * @return ManagerModel |
|
| 19 | */ |
|
| 20 | public function getManager($id) |
|
| 21 | { |
|
| 22 | try { |
|
| 23 | $response = $this->client->get('/manager/'.$id); |
|
| 24 | ||
| 25 | return $this->serializer->deserialize($response->getBody(), ManagerModel::class, 'json'); |
|
| 26 | } catch (ClientException $e) { |
|
| 27 | throw $this->createApiException($e); |
|
| 28 | } |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * Get the manager for the user owing the API key. |
|