Skip to content

Commit

Permalink
Merge branch 'release/v0.7.14'
Browse files Browse the repository at this point in the history
* release/v0.7.14:
  Bump version
  clear connection object on error
  Update samples and Readme
  • Loading branch information
gfoiani committed Feb 14, 2020
2 parents fe1dd8a + ff370a0 commit efb2f73
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 25 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ All notable changes to this project will be documented in this file.
- `0.5.x` Releases - [0.5.0] [0.5.1] [0.5.2]
- `0.6.x` Releases - [0.6.0] [0.6.1]
- `0.6.x` Releases - [0.6.0] [0.6.1]
- `0.7.x` Releases - [0.7.0] [0.7.1] [0.7.2] [0.7.3] [0.7.4] [0.7.5] [0.7.6] [0.7.7] [0.7.8] [0.7.9] [0.7.11] [0.7.12] [0.7.13]
- `0.7.x` Releases - [0.7.0] [0.7.1] [0.7.2] [0.7.3] [0.7.4] [0.7.5] [0.7.6] [0.7.7] [0.7.8] [0.7.9] [0.7.11] [0.7.12] [0.7.13] [0.7.14]

---

## [0.7.14](https://github.com/space-bunny/node-sdk/releases/tag/v0.7.14)

#### Changed

- Fix connection error handling

---

Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,25 +172,25 @@ Examples cover device and stream scenarios:

### AMQP
```
npm run start:node-sample examples/device/amqp/receiver.js --deviceKey=my-device-key
npm run start:node-sample examples/device/amqp/publisher.js --deviceKey=my-device-key --channel=data
npm run start:node-sample examples/stream/amqp/streamer.js --client=client-id --secret=secret
npm run start:node-sample examples/device/amqp/receiver.js -- --deviceKey=my-device-key
npm run start:node-sample examples/device/amqp/publisher.js -- --deviceKey=my-device-key --channel=data
npm run start:node-sample examples/stream/amqp/streamer.js -- --client=client-id --secret=secret
--stream=data --stream=alarms
```

### MQTT
```
npm run start:node-sample examples/device/mqtt/receiver.js --deviceKey=my-device-key
npm run start:node-sample examples/device/mqtt/publisher.js --deviceKey=my-device-key --channel=data
npm run start:node-sample examples/stream/mqtt/streamer.js --client=client-id --secret=secret
npm run start:node-sample examples/device/mqtt/receiver.js -- --deviceKey=my-device-key
npm run start:node-sample examples/device/mqtt/publisher.js -- --deviceKey=my-device-key --channel=data
npm run start:node-sample examples/stream/mqtt/streamer.js -- --client=client-id --secret=secret
--stream=data --stream=alarms
```

### STOMP
```
npm run start:node-sample examples/device/stomp/receiver.js --deviceKey=my-device-key
npm run start:node-sample examples/device/stomp/publisher.js --deviceKey=my-device-key --channel=data
npm run start:node-sample examples/stream/stomp/streamer.js --client=client-id --secret=secret
npm run start:node-sample examples/device/stomp/receiver.js -- --deviceKey=my-device-key
npm run start:node-sample examples/device/stomp/publisher.js -- --deviceKey=my-device-key --channel=data
npm run start:node-sample examples/stream/stomp/streamer.js -- --client=client-id --secret=secret
--stream=data --stream=alarms
```

Expand Down
3 changes: 2 additions & 1 deletion examples/device/amqp/publisher.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const args = require('minimist')(process.argv.slice(2));
// and substitute it here:
// You can also provide the endpointUrl to use a different end point, default is http://api.demo.spacebunny.io
const deviceKey = args['deviceKey'] || args['device-key'] || args['device_key'] || 'my-device-key';
const connectionParams = { deviceKey };
const tls = (args['tls'] !== false);
const connectionParams = { deviceKey, tls };

// You can also provide full manual configuration
// const connectionParams = {
Expand Down
5 changes: 3 additions & 2 deletions examples/device/amqp/receiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const args = require('minimist')(process.argv.slice(2));

// callback called when a message is received
const messageCallback = (amqpMessage) => {
console.log(amqpMessage.content); // eslint-disable-line no-console
console.log(amqpMessage); // eslint-disable-line no-console
};

// Prerequisites: you have created a device through the Space Bunny's web interface. You also have a 'data' channel (name
Expand All @@ -14,7 +14,8 @@ const messageCallback = (amqpMessage) => {
// go to devices section and create or pick an existing device. Click on the 'SHOW CONFIGURATION' link,
// copy the Device-Key and substitute it here:
const deviceKey = args['deviceKey'] || args['device-key'] || args['device_key'] || 'my-device-key';
const connectionParams = { deviceKey };
const tls = (args['tls'] !== false);
const connectionParams = { deviceKey, tls };
// You can also provide the endpointUrl to use a different end point, default is http://api.demo.spacebunny.io

// You can also provide full manual configuration
Expand Down
3 changes: 2 additions & 1 deletion examples/device/mqtt/publisher.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const args = require('minimist')(process.argv.slice(2));
// go to devices section and create or pick an existing device. Click on the 'SHOW CONFIGURATION' link,
// copy the Device-Key and substitute it here:
const deviceKey = args['deviceKey'] || args['device-key'] || args['device_key'] || 'my-device-key';
const connectionParams = { deviceKey };
const tls = (args['tls'] !== false);
const connectionParams = { deviceKey, tls };

// You can also provide the endpointUrl to use a different end point, default is http://api.demo.spacebunny.io

Expand Down
3 changes: 2 additions & 1 deletion examples/device/mqtt/receiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const messageCallback = (topic, message) => {
// go to devices section and create or pick an existing device. Click on the 'SHOW CONFIGURATION' link,
// copy the Device-Key and substitute it here:
const deviceKey = args['deviceKey'] || args['device-key'] || args['device_key'] || 'my-device-key';
const connectionParams = { deviceKey };
const tls = (args['tls'] !== false);
const connectionParams = { deviceKey, tls };

// You can also provide the endpointUrl to use a different end point, default is http://api.demo.spacebunny.io

Expand Down
3 changes: 2 additions & 1 deletion examples/device/stomp/publisher.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const args = require('minimist')(process.argv.slice(2));
// go to devices section and create or pick an existing device. Click on the 'SHOW CONFIGURATION' link,
// copy the Device-Key and substitute it here:
const deviceKey = args['deviceKey'] || args['device-key'] || args['device_key'] || 'my-device-key';
const connectionParams = { deviceKey };
const tls = (args['tls'] !== false);
const connectionParams = { deviceKey, tls };

// You can also provide the endpointUrl to use a different end point, default is http://api.demo.spacebunny.io

Expand Down
3 changes: 2 additions & 1 deletion examples/device/stomp/receiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const messageCallback = (content) => {
// go to devices section and create or pick an existing device. Click on the 'SHOW CONFIGURATION' link,
// copy the Device-Key and substitute it here:
const deviceKey = args['deviceKey'] || args['device-key'] || args['device_key'] || 'my-device-key';
const connectionParams = { deviceKey };
const tls = (args['tls'] !== false);
const connectionParams = { deviceKey, tls };

// You can also provide the endpointUrl to use a different end point, default is http://api.demo.spacebunny.io

Expand Down
Loading

0 comments on commit efb2f73

Please sign in to comment.