From 3e29e2615d2f3c1001e71541a2793ce7bfb38c4d Mon Sep 17 00:00:00 2001 From: Mees van der Wijk Date: Sun, 10 Aug 2025 17:34:23 +0200 Subject: [PATCH] Added neighbor class --- ModuleClientAPINeighbor.md | 31 +++++++++++++++++++++++++++++++ ModuleClientAPINeighborResults.md | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/ModuleClientAPINeighbor.md b/ModuleClientAPINeighbor.md index 86d91d4..e6ac586 100644 --- a/ModuleClientAPINeighbor.md +++ b/ModuleClientAPINeighbor.md @@ -1,3 +1,34 @@ # ModuleClientApi - Neighbor Class representing a Neighbor of the ModuleClientAPI User. + +## Methods + +Send a packet to this neighbor. + +```javascript +Neighbor.send(header, ...args); +``` + +| Argument | Type | Description | +| -------- | ------ | -------------------------- | +| header | string | The header of the message. | +| args | any[] | Data of any type. | + +## Constants + +## moduleType + +The type of the module. + +```javascript +Neighbor.moduleType; +``` + +## moduleId + +The id of the module. + +```javascript +Neighbor.moduleId; +``` diff --git a/ModuleClientAPINeighborResults.md b/ModuleClientAPINeighborResults.md index f33a18d..4733c0d 100644 --- a/ModuleClientAPINeighborResults.md +++ b/ModuleClientAPINeighborResults.md @@ -73,7 +73,7 @@ NeighborResults.last(); **Returns** [Neighbor](./ModuleClientAPINeighbor) _Neighbor instance._ -## Attributes +## Constants ### length