init.runApp - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki

gigagenie.init.runApp

API μ„€λͺ…

  • λ‹€λ₯Έ App 호좜 API
  • 호좜 λŒ€μƒ μ„œλΉ„μŠ€μ˜ AppIDλ₯Ό μ•Œμ•„μ•Ό 함
  • ν˜ΈμΆœμ‹œ ν˜„μž¬ μ‹€ν–‰ 쀑인 μ„œλΉ„μŠ€λŠ” 쀑지됨

API ꡬ쑰

  • function runApp(options,callback)
  • options
    • appid: (String, Mandatory) μ „λ‹¬ν•˜λ €λŠ” μ‚¬μš©μž μ •μ˜ operation
    • actioncode: (String, Mandatory) μ‹€ν–‰ν•˜λ €λŠ” Action
    • parameter : (JSONObject, Optional) μ „λ‹¬ν•˜λ €λŠ” parameter
    • callbackParameter : (JSONObject, Optional) RunApp 으둜 ν˜ΈμΆœν•œ 앱이 runParent μ˜΅μ…˜μœΌλ‘œ μ’…λ£Œλ  λ•Œ runApp을 μ‹€ν–‰ν•œ μ•±μœΌλ‘œ 전달할 parameter
  • result_cd
    • 200: 호좜 성곡
    • 500: μ‹œμŠ€ν…œ μ—λŸ¬
  • extra
    • null

μ‚¬μš© μ˜ˆμ‹œ

// callback 방식
var options = {};
options.appid = "A0000006"; // μˆ˜μ • ν›„ μ‚¬μš©
options.actioncode = "test"; // μˆ˜μ • ν›„ μ‚¬μš©
var parameters = {
    reqParam1: 'reqParam1', // μˆ˜μ • ν›„ μ‚¬μš©
    reqParam2: 'reqParam2' // μˆ˜μ • ν›„ μ‚¬μš©
};
options.parameter = parameters;
options.callbackParameter = {
    param1: 'hello' // μˆ˜μ • ν›„ μ‚¬μš©
};
gigagenie.init.runApp(options, function (result_cd, result_msg, extra) {
    console.log("gigagenie.init.runApp - result_cd:" + result_cd);
    console.log("gigagenie.init.runApp - result_msg:" + result_msg);
    console.log("gigagenie.init.runApp - extra:" + JSON.stringify(extra));
});