代码之家  ›  专栏  ›  技术社区  ›  Matthew Barker

无法使用文档中的代码访问Bixby的唯一标识符

  •  1
  • Matthew Barker  · 技术社区  · 7 年前

    要访问Bixby的唯一标识符,我正在尝试访问 contactId 域内的字段 contact viv.self 我想是吧。我试着使用文档中的代码片段 here ,但我有一些错误。

    Source

    text (Name) {
      extends (contact.StructuredName)
    }
    

    错误

    错误:无效的胶囊别名联系人


    integer (Identifier) {
      extends (contact.ContactId)
    }
    

    如果您有任何关于访问此数据的帮助,我们将不胜感激!

    0 回复  |  直到 7 年前
        1
  •  2
  •   Matthew Barker    7 年前

    docs here .


    在相应的JavaScript文件中,访问$vivContext.locale参数以返回区域设置信息。

    module.exports.function = function accessVivContext (dummyInput, $vivContext) {
      var result = "Testing Access vivContext..."
    
      // See docs for all the properties of $vivContext
      result = $vivContext.userId
      return result 
    }
    

    action-endpoint (AccessVivContext) {
      accepted-inputs (dummyInput, $vivContext) 
      local-endpoint ("AccessVivContext.js")
    }
    
    推荐文章