appinfo.getContainerId - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki
gigagenie.appinfo.getContainerId
API ์ค๋ช
- ContainerId ์กฐํ API
- ํด๋น ์ฑ์ ๋ํ G-Box ์ ContainerId ๋ฅผ ์กฐํํจ
API ๊ตฌ์กฐ
- function getContainerId(options,callback)
options
result_cd
200
: ์ฑ๊ณต
500
: ์์คํ
Error
extra
containerid
: (String) Container ์ ID ๊ฐ
deviceid
: (String) ๋จ๋ง์ Unique ํ ID ๊ฐ
์ฌ์ฉ ์์
// callback ๋ฐฉ์
var options = {};
gigagenie.appinfo.getContainerId(options, function (result_cd, result_msg, extra) {
if (result_cd === 200) {
console.log("The container id is " + extra.containerid);
console.log("The device id is " + extra.deviceid);
} else {
console.log("getContainerId is fail.");
}
});
// promise ๋ฐฉ์
var options = {};
gigagenie.appinfo.getContainerId(options).then(function (extra) {
console.log("The container id is " + extra.containerid);
console.log("The device id is " + extra.deviceid);
}).catch(function (result_cd, result_msg, extra) {
console.log("getContainerId is fail.");
})