Skip to content

Commit

Permalink
Update jsdoc string for CloudSynchroniser (#48)
Browse files Browse the repository at this point in the history
* Update jsdoc string for CloudSynchroniser to describe expected hostname, port object

* Update other mentions of syncUrl
  • Loading branch information
kristianhentschelbbc authored Apr 19, 2022
1 parent 739adc3 commit 57e1c94
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/cloud-sync-client/client-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The ```options``` parameter is an object specifying preferences such as the sync
// Require cloud-synchroniser module
var cloudSyncKit = require("CloudSyncKit");

var syncUrl = "mqttbroker.edge.platform.2immerse.eu"; // a Sync Service MQTT endpoint
var syncUrl = { hostname: "mqttbroker.edge.platform.2immerse.eu" }; // a Sync Service MQTT endpoint
var sessionId = "223dsf452asd"; // a globally-unique session identifier
var deviceId = "chris_iphone"; // a client identifier
var options = { syncTimelineElection: cloudSyncKit.SyncTLElection.DYNAMIC }; // options e.g. desired sync mode
Expand Down
4 changes: 3 additions & 1 deletion packages/cloud-sync-client/src/client/CloudSyncKit.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ module.exports = {
/**
*
* Returns an instance of CloudSynchroniser
* @param {string} syncUrl
* @param {object} syncUrl An object specifying connection parameters
* @param {string} syncUrl.hostname
* @param {number=} syncUrl.port
* @param {string} sessionId
* @param {string} contextId
* @param {string} deviceId
Expand Down
4 changes: 3 additions & 1 deletion packages/cloud-sync-client/src/client/CloudSynchroniser.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ function log() {
* @classdesc Client library of the cloud Synchronisation Service.
*
* @constructor
* @param {string} syncUrl Address of the Synchronisation Service
* @param {object} syncUrl An object specifying connection parameters
* @param {string} syncUrl.hostname
* @param {number=} syncUrl.port Optional port number for a plain ws:// connection, if not given the default HTTPS port and wss:// protocol is used
* @param {string} sessionId Identifier of the synchronisation session
* @param {string} contextId Identifier of the synchronisation context
* @param {string} deviceId Identifier of for this client, i.e. device
Expand Down
4 changes: 2 additions & 2 deletions packages/cloud-sync-client/src/client/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The ```options``` parameter is an object specifying preferences such as the sync
// Require cloud-synchroniser module
var cloudSyncKit = require("CloudSyncKit");

var syncUrl = "mqttbroker.edge.platform.2immerse.eu"; // a Sync Service MQTT endpoint
var syncUrl = { hostname: "mqttbroker.edge.platform.2immerse.eu" }; // a Sync Service MQTT endpoint
var sessionId = "223dsf452asd"; // a globally-unique session identifier
var deviceId = "chris_iphone"; // a client identifier
var options = { syncTimelineElection: cloudSyncKit.SyncTLElection.DYNAMIC }; // options e.g. desired sync mode
Expand Down Expand Up @@ -288,4 +288,4 @@ Documentation is generated and output as HTML into the `doc` subfolder.
## Authors

* Rajiv Ramdhany (BBC)
* Christoph Ziegler (IRT)
* Christoph Ziegler (IRT)

0 comments on commit 57e1c94

Please sign in to comment.