From c7ff4942b1f56cb84bee289be3512cde3a5fa412 Mon Sep 17 00:00:00 2001 From: panaaj <38519157+panaaj@users.noreply.github.com> Date: Mon, 11 Jul 2022 15:40:03 +0930 Subject: [PATCH] chore: doc updates --- CHANGELOG.md | 3 +++ HTTP_API.md | 12 ++++++------ STREAM_API.md | 32 ++++++++++++++++---------------- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be691fe..cd08cf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG: signalk-client +### v1.0.1 + +- add `validate()` method for token validation / renewal ### v1.0.0 diff --git a/HTTP_API.md b/HTTP_API.md index cc86c38..9fb8323 100644 --- a/HTTP_API.md +++ b/HTTP_API.md @@ -267,10 +267,10 @@ _Examples:_ ```javascript signalk.api.raiseAlarm( - "self", - "Anchor", + 'self', + 'Anchor', new Alarm( - "Anchor dragging!", + 'Anchor dragging!', AlarmState.alarm, true, true, @@ -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, @@ -308,7 +308,7 @@ _Returns_: Promise _Examples:_ ```javascript -signalk.api.clearAlarm("self", "MOB"); +signalk.api.clearAlarm('self', 'MOB'); ``` --- diff --git a/STREAM_API.md b/STREAM_API.md index c943106..4746705 100644 --- a/STREAM_API.md +++ b/STREAM_API.md @@ -171,7 +171,7 @@ the specified user. _Example:_ ```javascript -signalk.stream.authToken = ""; +signalk.stream.authToken = ''; ``` Once you have supplied an `authToken` it will be used for all subsequent @@ -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 **** @@ -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 **** @@ -547,10 +547,10 @@ _Examples:_ ```javascript signalk.stream.raiseAlarm( - "self", - "Anchor", + 'self', + 'Anchor', new Alarm( - "Anchor dragging!", + 'Anchor dragging!', AlarmState.alarm, true, true, @@ -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, @@ -585,7 +585,7 @@ _Parameters:_ _Examples:_ ```javascript -signalk.stream.clearAlarm("self", "MOB"); +signalk.stream.clearAlarm('self', 'MOB'); ``` ---