Jasmine250
New member
- Joined
- Jun 10, 2008
- Messages
- 2
- Programming Experience
- Beginner
Hi Everyone
I've just joined and hope someone can help me out
(I don't have a great deal of experience though.)
I'm using REST with Amazon to use their 'top Sellers' feed. The data comes down ok but since it only provides 'title' and 'asin' I need to carry out another request to get the full details of the top selliing products.
In order to do this I need to extract the 'asin' number from the first dataset I've created, and then concatenate it to a new string for the second request.
The concatenation isn't a problem - just getting the value, I can't get the value whatever I try!!
Many thanks
Here's my code: [The dataset is bound to a datagrid simply to display results]
sub page_load(Src as Object, E as EventArgs)
Dim RESTstring = "http://webservices.amazon.co.uk/onca/xml?Service=AWSECommerceService&Operation=ItemSearch&AWSAccessKeyId=116AQMJ35GESH5XBF1G2&AssociateTag=wii07-21&SearchIndex=Toys&Title=Power%20Rangers&Sort=salesrank&ResponseGroup=Large&Style=http://www.wiiuser.co.uk/transform.xslt"
Dim myDataset as New Dataset()
Dim myDataset2 as New Dataset()
myDataSet.ReadXML(RESTstring)
Dim arASIN() As String
ReDim arASIN(myDataset.Tables(0).Rows.Count)
For i As Integer = 0 To myDataset.Tables(0).Rows.Count - 1
arASIN(i) = myDataset.Tables(0).Rows(i).Item(0).ToString
Next
RESTstring ="http://webservices.amazon.co.uk/onca/xml?Service=AWSECommerceService&SubscriptionId=116AQMJ35GESH5XBF1G2&Operation=ItemLookup&ItemId=" & arASIN(0) & "&ResponseGroup=Small"
myDataSet2.ReadXML(RESTstring)
dgAmazon.Datasource = myDataSet2
dgAmazon.DataMember = "item"
dgAmazon.DataBind()
end sub
I've just joined and hope someone can help me out
I'm using REST with Amazon to use their 'top Sellers' feed. The data comes down ok but since it only provides 'title' and 'asin' I need to carry out another request to get the full details of the top selliing products.
In order to do this I need to extract the 'asin' number from the first dataset I've created, and then concatenate it to a new string for the second request.
The concatenation isn't a problem - just getting the value, I can't get the value whatever I try!!
Many thanks
Here's my code: [The dataset is bound to a datagrid simply to display results]
sub page_load(Src as Object, E as EventArgs)
Dim RESTstring = "http://webservices.amazon.co.uk/onca/xml?Service=AWSECommerceService&Operation=ItemSearch&AWSAccessKeyId=116AQMJ35GESH5XBF1G2&AssociateTag=wii07-21&SearchIndex=Toys&Title=Power%20Rangers&Sort=salesrank&ResponseGroup=Large&Style=http://www.wiiuser.co.uk/transform.xslt"
Dim myDataset as New Dataset()
Dim myDataset2 as New Dataset()
myDataSet.ReadXML(RESTstring)
Dim arASIN() As String
ReDim arASIN(myDataset.Tables(0).Rows.Count)
For i As Integer = 0 To myDataset.Tables(0).Rows.Count - 1
arASIN(i) = myDataset.Tables(0).Rows(i).Item(0).ToString
Next
RESTstring ="http://webservices.amazon.co.uk/onca/xml?Service=AWSECommerceService&SubscriptionId=116AQMJ35GESH5XBF1G2&Operation=ItemLookup&ItemId=" & arASIN(0) & "&ResponseGroup=Small"
myDataSet2.ReadXML(RESTstring)
dgAmazon.Datasource = myDataSet2
dgAmazon.DataMember = "item"
dgAmazon.DataBind()
end sub