Skip to content

Commit 3c690a1

Browse files
authored
DOCS-3940: Update app-client.ts (#552)
1 parent 3ad7ca0 commit 3c690a1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/app/app-client.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,15 @@ export class AppClient {
827827
*
828828
* ```ts
829829
* const robotPart = await appClient.getRobotPart('<YOUR-ROBOT-PART-ID>');
830+
* // Get the part's address
831+
* const address = robotPart.part.fqdn;
832+
* // Check if machine is live (last access time less than 10 sec ago)
833+
* if (
834+
* Date.now() - Number(robotPart.part.lastAccess.seconds) * 1000 <=
835+
* 10000
836+
* ) {
837+
* console.log('Machine is live');
838+
* }
830839
* ```
831840
*
832841
* For more information, see [App

0 commit comments

Comments
 (0)