call.requestCall - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki

gigagenie.call.requestCall

API μ„€λͺ…

  • 톡화 μš”μ²­ API
  • μž…λ ₯ν•œ 번호둜 GiGA Genie 톡화 μ„œλΉ„μŠ€λ₯Ό μš”μ²­ν•¨

API ꡬ쑰

  • function requestCall(options,callback)
  • options
    • callnumber: (String, Mandatory) 톡화λ₯Ό μš”μ²­ν•  μ „ν™”λ²ˆν˜Έ
    • calltype: (Int, Mandatory) 톡화 νƒ€μž…
      • 0: μŒμ„± 톡화
      • 1: μ˜μƒ 톡화
  • result_cd
    • 200: 성곡
  • extra
    • null

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

// callback
var options = {};
options.callnumber = "021234567";
options.calltype = 0;
gigagenie.call.requestCall(options, function (result_cd, result_msg, extra) {
    if (result_cd === 200) {
        console.log("Received Call Number is " + extra.callnumber);
    };
});

// promise
var options = {};
options.callnumber = "021234567";
options.calltype = 0;
gigagenie.call.requestCall(options).then(function (extra) {
    console.log("Received Call Number is " + extra.callnumber);
}).catch(function (result_cd, result_msg, extra) {
    // 
})