Skip to content

Commit

Permalink
chore: doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
panaaj committed Jul 11, 2022
1 parent 291a5ae commit c7ff494
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 22 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG: signalk-client

### v1.0.1

- add `validate()` method for token validation / renewal

### v1.0.0

Expand Down
12 changes: 6 additions & 6 deletions HTTP_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,10 @@ _Examples:_

```javascript
signalk.api.raiseAlarm(
"self",
"Anchor",
'self',
'Anchor',
new Alarm(
"Anchor dragging!",
'Anchor dragging!',
AlarmState.alarm,
true,
true,
Expand All @@ -280,10 +280,10 @@ signalk.api.raiseAlarm(
// ** using special alarm type **

signalk.api.raiseAlarm(
"self",
'self',
AlarmType.sinking,
new Alarm(
"SINKING",
'SINKING',
AlarmState.alarm,
true,
true,
Expand All @@ -308,7 +308,7 @@ _Returns_: Promise
_Examples:_

```javascript
signalk.api.clearAlarm("self", "MOB");
signalk.api.clearAlarm('self', 'MOB');
```

---
Expand Down
32 changes: 16 additions & 16 deletions STREAM_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ the specified user.
_Example:_

```javascript
signalk.stream.authToken = "<auth_token_string>";
signalk.stream.authToken = '<auth_token_string>';
```

Once you have supplied an `authToken` it will be used for all subsequent
Expand Down Expand Up @@ -482,17 +482,17 @@ _Example:_

```javascript
// **** subscribe using defaults ****
signalk.stream.subscribe("self", "navigation.courseOverGroundTrue");
signalk.stream.subscribe('self', 'navigation.courseOverGroundTrue');

// **** subscribe using some specified options ****
signalk.stream.subscribe("self", "navigation.courseOverGroundTrue", {
signalk.stream.subscribe('self', 'navigation.courseOverGroundTrue', {
period: 2000,
});

// **** subscribe to a numbe rof paths ****
signalk.stream.subscribe("self", [
{ path: "navigation.courseOverGroundTrue", period: 2000 },
{ path: "navigation.speedOverGround", period: 2000 },
signalk.stream.subscribe('self', [
{ path: 'navigation.courseOverGroundTrue', period: 2000 },
{ path: 'navigation.speedOverGround', period: 2000 },
]);

// **** subscribe to all updates ****
Expand All @@ -517,11 +517,11 @@ _Examples:_

```javascript
// **** unsubscribe from specific updates ****
signalk.stream.unsubscribe("self", "navigation.courseOverGroundTrue");
signalk.stream.unsubscribe('self', 'navigation.courseOverGroundTrue');

signalk.stream.unsubscribe("self", [
"navigation.courseOverGroundTrue",
"navigation.speedOverGround",
signalk.stream.unsubscribe('self', [
'navigation.courseOverGroundTrue',
'navigation.speedOverGround',
]);

// **** unsubscribe from all updates ****
Expand All @@ -547,10 +547,10 @@ _Examples:_

```javascript
signalk.stream.raiseAlarm(
"self",
"Anchor",
'self',
'Anchor',
new Alarm(
"Anchor dragging!",
'Anchor dragging!',
AlarmState.alarm,
true,
true,
Expand All @@ -559,10 +559,10 @@ signalk.stream.raiseAlarm(

// ** using special alarm type **
signalk.stream.raiseAlarm(
"self",
'self',
AlarmType.sinking,
new Alarm(
"SINKING",
'SINKING',
AlarmState.alarm,
true,
true,
Expand All @@ -585,7 +585,7 @@ _Parameters:_
_Examples:_

```javascript
signalk.stream.clearAlarm("self", "MOB");
signalk.stream.clearAlarm('self', 'MOB');
```

---
Expand Down

0 comments on commit c7ff494

Please sign in to comment.