【问题标题】:Querying Amazon MWS from Google Apps Script从 Google Apps 脚本查询亚马逊 MWS
【发布时间】:2016-05-12 15:13:33
【问题描述】:

我正在尝试查询 Aazon MWS 以按 ASIN 获取产品价格。但我无法在 Google Apps 脚本中转换查询,因此我可以与 UrlFetchApp 一起使用。请帮忙。

http://docs.developer.amazonservices.com/en_US/products/Products_GetMyPriceForASIN.html

【问题讨论】:

    标签: google-apps-script amazon amazon-mws


    【解决方案1】:

    修改示例 here 以与您链接的 AWS 示例的一部分对齐:

    function sendHttpPost() {
    
    
       var payload =
       {
         "ASINList.ASIN.1" : "1933890517",
         "AWSAccessKeyId" : "AKIAEXAMPLEFWR4TJ7ZQ",
         "MWSAuthToken": "amzn.mws.4ea38b7b-f563-7709-4bae-87aeaEXAMPLE"
         // and so on for all of the name value pairs that make up the query
       };
    
       // Because payload is a JavaScript object, it will be interpreted as
       // an HTML form. (We do not need to specify contentType; it will
       // automatically default to either 'application/x-www-form-urlencoded'
       // or 'multipart/form-data')
    
       var options =
       {
         "method" : "post",
         "payload" : payload
       };
    
       UrlFetchApp.fetch("http://example.com/upload_form.cgi", options);
     }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-11-13
      • 2012-02-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多