Browse Node IDs

Discussion in 'Amazon' started by betterpath, Jul 3, 2009.

  1. #1
    I am tring to figure out how to get a list of Browse Node IDs from a search index in asp.net. Any example code out there?
     
    betterpath, Jul 3, 2009 IP
  2. vomers

    vomers Peon

    Messages:
    13
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Not big with asp PHP is more my style.

    Not sure if you have seen the developers guide
    http://docs.amazonwebservices.com/AWSECommerceService/2009-07-01/DG/
    the go to
    Welcome » API Reference » Browse Node IDs

    to get a list of browse node IDS.

    Also this code snippet may help:

    public static DataSet GetNodes(string node)
    {
    BrowseNodeLookupRequest req=new BrowseNodeLookupRequest();
    req.BrowseNodeId=node;
    BrowseNodeLookupRequest [] reqs=new BrowseNodeLookupRequest[]{req};
    BrowseNodeLookup lookup=new BrowseNodeLookup();
    lookup.AssociateTag=AmazonTag;
    lookup.SubscriptionId=SubscriptionId;
    lookup.Request=reqs;
    AWSECommerceService service=new AWSECommerceService();
    BrowseNodeLookupResponse resp=new BrowseNodeLookupResponse();
    resp=service.BrowseNodeLookup(lookup);
    BrowseNode[] bn=resp.BrowseNodes[0].BrowseNode;
    string name=bn[0].Name;
    BrowseNode[] children=bn[0].Children;
    DataSet ds=new DataSet();
    ds.Tables.Add("Children");
    ds.Tables["Children"].Columns.Add("ChildTitle");
    ds.Tables["Children"].Columns.Add("ChildNode");
    DataRow r;
    for(int i=0;i<children.Length;i++)<br /> {
    r=ds.Tables["Children"].NewRow();
    r["ChildTitle"]=children .Name;
    r["ChildNode"]=children .BrowseNodeId;
    ds.Tables["Children"].Rows.Add(r);
    }
    ds.Tables.Add("Parents");
    ds.Tables["Parents"].Columns.Add("ParentTitle");
    ds.Tables["Parents"].Columns.Add("ParentNode");
    r=ds.Tables["Parents"].NewRow();
    r["ParentTitle"]=name;
    r["ParentNode"]=node;
    ds.Tables["Parents"].Rows.Add(r);
    return ds;
    }

    I wish your luck.
     
    vomers, Aug 31, 2009 IP