代码之家  ›  专栏  ›  技术社区  ›  Ironwind

日本的亚马逊产品api浏览节点ID不起作用

  •  0
  • Ironwind  · 技术社区  · 12 年前
    $request = "http://webservices.amazon.com/onca/xml?" .
           "Service=AWSECommerceService" . 
           "&Operation=BrowseNodeLookup" .
           "&BrowseNodeId=465610" . 
           "&MerchantId=All" . 
           "&Condition=All" . 
           "&Availability=Available" . 
           "&Sort=salesrank" . 
           "&Version=$this->version" . 
           "&AssociateTag=$this->associateTag" . 
           "&BrowseNode=17".
           "&SearchIndex=Books" . 
           "&ResponseGroup=TopSellers";
    

    我在发送请求(如上)时收到此回复(如下):

    <Message>
    BrowseNodes is not a valid value for ResponseGroup. Please change this value and retry your request.
    </Message>
    

    BrowseNodeId 465610 你可以在这里看到日本的图书id吗: http://docs.aws.amazon.com/AWSECommerceService/latest/DG/BrowseNodeIDs.html

    为什么我有这些问题?有什么想法吗?

    附笔:

    上面的$request是未处理的,当处理时它正在工作,响应是xml格式的

    1 回复  |  直到 12 年前
        1
  •  1
  •   user2861062 user2861062    12 年前
    $uri = "http://webservices.amazon.co.jp/onca/xml?" .
                    "Service=AWSECommerceService" .
                    "&Operation=BrowseNodeLookup" .
                    "&MerchantId=All" .
                    "&Condition=All" .
                    "&Sort=salesrank" .
                    "&Version=$this->version" .
                    "&AssociateTag=$this->associateTag" .
                    "&SearchIndex=Books" .
                    "&BrowseNodeId=465610" .
                    "&ResponseGroup=TopSellers";
    

    试试看,你不需要BrowseNode,它只会将你获得的记录限制在BrowseNode 17,即Literature&虚构,这是关于美国的,而不是关于日元的,我不知道日元是否不同。

    推荐文章