cloud
cloud copied to clipboard
Can't use it, many errors
Hello, First time for me using npm, so sorry if I'm doing it on wrong way but following all instructions, I got:
` test.js:72:1 ‼ 72:1 test.todo() should be not be used. ava/no-todo-test
index.js:32:1 ‼ 44:1 Function TuyaCloud has a complexity of 23. complexity × 32:1 Line 32 exceeds the maximum line length of 90. max-len × 33:1 Line 33 exceeds the maximum line length of 90. max-len × 35:1 Line 35 exceeds the maximum line length of 90. max-len × 61:1 Line 61 exceeds the maximum line length of 90. max-len × 62:1 Line 62 exceeds the maximum line length of 90. max-len × 83:3 Closing curly brace does not appear on the same line as the subsequent block. brace-style × 95:1 Expected indentation of 4 spaces but found 6. indent × 96:1 Expected indentation of 4 spaces but found 6. indent × 385:1 Expected indentation of 6 spaces but found 8. ` Could you help me please?
Kind regards Philippe
Why you execute the tests if you want to use it? Just do not execute the tests and just use it :-)
I try to execute it because I want to see if it's working and how it's working lol and if my ident for api is accepted
To use it, if I understand correctly, I can paste your sample usage in test.js: `` const Cloud = require('@tuyapi/cloud');
let api = new Cloud({key: 'your-api-app-key', secret: 'your-api-app-secret'});
api.register({email: '[email protected]', password: 'example-password'}).then(async sid => { let token = await api.request({action: 'tuya.m.device.token.create', data: {'timeZone': '-05:00'}});
console.log(token) // => { secret: '0000', token: '01010101' } }); `` and replace your-api-app-key, your-api-app-secret, [email protected], example-password with my own information and then run node test.js
doing that, I got same errors.
I did make the keys.json with my informations with add region: EU in case but same result.