appinfo.getAddress - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki

gigagenie.appinfo.getAddress

API ์„ค๋ช…

  • ์šฐ๋ฆฌ์ง‘ ์ฃผ์†Œ ์กฐํšŒ API
  • GiGA Genie ์— ์„ค์ •๋œ ์šฐ๋ฆฌ์ง‘ ์ฃผ์†Œ๋ฅผ ์กฐํšŒํ•จ
  • ์šฐ๋ฆฌ์ง‘ ์ฃผ์†Œ๋Š” Companion App ์—์„œ ์„ค์ •ํ•œ ์ฃผ์†Œ ์ •๋ณด์ž„

API ๊ตฌ์กฐ

  • function getAddress(options,callback)
  • options
    • null
  • result_cd
    • 200: ์„ฑ๊ณต
    • 404: ์ €์žฅ๋œ ์ฃผ์†Œ๊ฐ’ ์—†์Œ
    • 500: ์‹œ์Šคํ…œ Error
  • extra
    • address: (String) ์šฐ๋ฆฌ์ง‘ ์ฃผ์†Œ๋กœ ์„ค์ •๋œ ์ฃผ์†Œ

์‚ฌ์šฉ ์˜ˆ์‹œ

//callback ๋ฐฉ์‹
gigagenie.appinfo.getAddress(null, function (result_cd, result_msg, extra) {
    if (result_cd === 200) {
        var address = extra.address;
        console.log("GiGA Genie Home Address=" + address + " " + subaddress);
    } else if (result_cd === 404) {
        var address = extra.address;
        console.log("Address is not found");
    } else {
        console.log("Getting Home Address fail.");
    }
});