appdata.delKeyData - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki

gigagenie.appdata.delKeyData

API μ„€λͺ…

  • 데이터 μ‚­μ œ API
  • νŠΉμ • μ΄λ¦„μ˜ λ°μ΄ν„°λ„€μž„μŠ€νŽ˜μ΄μŠ€μ— Key와 Dataλ₯Ό μ‚­μ œν•¨

API ꡬ쑰

  • function delKeyData(options,callback)
  • options
    • namespace: (String, Mandatory) μ‚­μ œν•˜λ €λŠ” key의 appdata Namespace
    • key: (String, Mandatory) ν•΄λ‹Ή NameSpace μ—μ„œ μ‚­μ œν•˜κ³ μž ν•˜λŠ” Key
  • result_cd
    • 200: 성곡
    • 403: ν•΄λ‹Ή NameSpace κ°€ μ‘΄μž¬ν•˜μ§€ μ•ŠμŒ
    • 404: ν•΄λ‹Ή Key κ°€ μ‘΄μž¬ν•˜μ§€ μ•ŠμŒ
    • 500: μ‹œμŠ€ν…œ Error
  • extra
    • null

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

// callback 방식
var options = {};
options.namespace = 'userappprofile';
options.key = 'appusername';
gigagenie.appdata.delKeyData(options, function (result_cd, result_msg, extra) {
    if (result_cd === 200) {
        console.log(options.key + ":" + extra.data + " is deleted");
    } else {
        console.log("Error");
    }
});
// promise 방식
var options = {};
options.namespace = 'userappprofile';
options.key = 'appusername';
gigagenie.appdata.delKeyData(options).then(function (extra) {
    console.log(options.key + ":" + extra.data + " is deleted");
}).catch(function (result_cd, result_msg, extra) {
    console.log("Error");
})