【问题标题】:ask cli SMAPI node.js interace is failing问 cli SMAPI node.js 交互失败
【发布时间】:2021-02-02 12:26:41
【问题描述】:

我正在尝试通过 nodejs 模块为 ask-cli 获取一些指标。这是我的命令和错误:

ask smapi get-skill-metrics --skill-id amzn1.ask.skill.xxxxx --start-time 2020-10-14T12:45:00Z --end-time 2020-10-19T12:45:00Z --period PT1H --metric uniqueCustomers --stage live --skill-type custom --locale en-US > metrics.json 

[Error]: { "name": "AskSdkModelRuntime.DefaultApiClient Error" } 

【问题讨论】:

    标签: node.js alexa alexa-skills-kit alexa-skill ask-cli


    【解决方案1】:

    啊,是的,我的 VPN 阻止了该请求。它现在可以工作,这是一个示例数据集。现在弄清楚它的含义:

    Operation: getSkillMetricsV1
    Payload:
    {
      "skillId": "amzn1.ask.skill.xxxx-xx-xx-xx-xxxx",
      "startTime": "2020-10-14T12:45:00Z",
      "endTime": "2020-10-19T12:45:00Z",
      "period": "PT1H",
      "metric": "uniqueCustomers",
      "stage": "live",
      "skillType": "custom",
      "intent": null,
      "locale": "en-US",
      "maxResults": null,
      "nextToken": null
    }
    
    Response:
    {
      "body": {
        "metric": "uniqueCustomers",
        "timestamps": [
          "2020-10-14T12:00:00Z",
          "2020-10-14T13:00:00Z",
          "2020-10-19T12:00:00Z"
        ],
        "values": [
          36,
          120,
          79,
          46 ]
      },
      "headers": [  ],
    
      "statusCode": 200
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-19
      • 2021-12-20
      • 2023-03-16
      • 2011-08-23
      • 2021-12-22
      • 1970-01-01
      • 1970-01-01
      • 2012-10-25
      相关资源
      最近更新 更多