1.1.13 • Published 9 months ago

iplayabc-speaker-iot-sdk v1.1.13

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

Huaweicloud & Azure Speaker IOT SDK

const platform = new CloudPlatform({
  AK: process.env.AK,
  SK: process.env.SK,
  ENDPOINT: process.env.IOT_END_POINT,
  APP_ID: process.env.APP_ID,
  PRODUCT_ID: process.env.PRODUCT_ID,
  PROJECT_ID: process.env.PROJECT_ID,

  IAM_ENDPOINT: process.env.IAM_ENDPOINT,
  IAM_USER: process.env.IAM_USER,
  IAM_PWD: process.env.HUAWEI_IAM_PWD,
  IAM_DOMAIN_ID: process.env.IAM_DOMAIN_ID,
  IAM_DOMAIN_NAME: process.env.IAM_DOMAIN_NAME,
})
deviceId = 'my-device-v1-1234567890'; 
let deviceInfo = await platform.getDevice(deviceId)
// remove device if exists
if (deviceInfo!=null) {
  await platform.removeDevice(deviceId)
  deviceInfo = await platform.getDevice(deviceId)
}
// device should not exist
chai.expect(deviceInfo).to.be.null
// create device
const password = await platform.createDeviceWithToken({
  deviceId
})
// password should be a string
chai.expect(password).to.be.a('string');
// get device info
deviceInfo = await platform.getDevice(deviceId)
// device should exist
chai.expect(deviceInfo).to.not.be.null
// remove device
const removed = await platform.removeDevice(deviceId)
chai.expect(removed).to.be.true
// device should not exist
deviceInfo = await platform.getDevice(deviceId)
chai.expect(deviceInfo).to.be.null
1.1.1

10 months ago

1.1.0

10 months ago

1.1.9

9 months ago

1.1.8

9 months ago

1.1.7

9 months ago

1.1.6

9 months ago

1.1.5

9 months ago

1.1.4

9 months ago

1.1.3

9 months ago

1.1.2

10 months ago

1.1.12

9 months ago

1.1.11

9 months ago

1.1.10

9 months ago

1.1.13

9 months ago

1.0.26

11 months ago

1.0.27

11 months ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago