jayhjha / smartthings-node

Node.js Client for Samsung SmartThings API
MIT License
15 stars 5 forks source link

Some apis on smartthings-node do not support apptoken parameter, #4

Open Kwanghyuk-Kim opened 5 years ago

Kwanghyuk-Kim commented 5 years ago

According to my initial check, some apis don't suppport apptoken as a parameter.

listDevicesByDeviceId(deviceId) { //<= no token parameter
    let queryParams = { deviceId: deviceId };
    return this.listDevices(queryParams);
}
listDevices(queryParams, smartAppToken) { //<= has token parameter, but it can not be used by listDeviceByDeviceid
    let authToken = this.getAuthToken(smartAppToken);
    return requestbuilder_1.default(authToken, 'devices', 'GET', queryParams);
}
Kwanghyuk-Kim commented 5 years ago

@hijha

I would like to get your idea for this. Is there any reason that you didn't support token parameter for some device apis ?