DoboWiki
Top
> 自由区/Webサービス紹介/Amazon E-Commerce Service/Code/VB.NET/SellerLookup をテンプレートにして作成
自由区/Webサービス紹介/Amazon E-Commerce Service/Code/VB.NET/SellerLookup をテンプレートにして作成
開始行:
*SellerLookupのサンプルコード(VB.NET) [#e10f70d3]
ここで紹介しているコードは[[こちらのプロキシクラス>../../...
ここで紹介しているコードは[[こちらのC#のコード>../../CS/S...
Amazon.co.jpの出品者へのカスタマーからの評価やフィードバ...
#code(vbnet){{
<%@ Page Language="VB" %>
<%@ Import Namespace="Amazon.jp.v20060913" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional...
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Button1_Click(ByVal sender As Object, _
ByVal e As EventArgs)
Dim req As New SellerLookupRequest()
'出品者のIDを指定
req.SellerId = New String() {TextBox1.Text}
Dim sl As New SellerLookup()
'あなたのAccess Key ID
sl.AWSAccessKeyId = "(あなたのAccessKeyID)"
'あなたのAssociate ID
sl.AssociateTag = "dobonnet-22"
sl.Request = New SellerLookupRequest() {req}
Dim aws As New AWSECommerceService()
Dim res As SellerLookupResponse
Try
'SellerLookupオペレーションを実行し、結果を取得
res = aws.SellerLookup(sl)
Catch ex As Exception
Label1.Text = "エラー:" + Server.HtmlEncode(...
Return
End Try
If res Is Nothing OrElse res.Sellers Is Nothing T...
Label1.Text = "結果を取得できませんでした。"
Return
End If
If Not (res.Sellers(0).Request.Errors Is Nothing)...
Label1.Text = "エラー:" + _
res.Sellers(0).Request.Errors(0).Message
Return
End If
If res.Sellers(0).Seller Is Nothing Then
Label1.Text = "該当するSellerが見つかりません...
Return
End If
'結果を表示
Label1.Text = ""
Label1.Text += "<ul>" + vbLf
Dim s As Seller
For Each s In res.Sellers(0).Seller
Label1.Text += "<li><b><a href=""" + _
s.GlancePage + """>" + s.Nickname + "</a>...
If s.AverageFeedbackRatingSpecified Then
Label1.Text += "<br />過去1年間の評価 : "...
s.AverageFeedbackRating.ToString()
End If
Label1.Text += "<br />Seller Id : " + s.Selle...
Label1.Text += "<br />評価数:" + s.TotalFeed...
Label1.Text += "<br />評価ページ数:" + _
s.TotalFeedbackPages
'評価の表示
Label1.Text += "<br />最近の評価:" + _
s.TotalFeedbackPages
If Not (s.SellerFeedback Is Nothing) Then
Label1.Text += "<ul>" + vbLf
Dim fb As SellerFeedbackFeedback
For Each fb In s.SellerFeedback
Label1.Text += "<li>評価 : " + fb.Rat...
Label1.Text += "<br />コメント : " + ...
Label1.Text += "<br />評価した購入者...
fb.RatedBy
Label1.Text += "<br />日付 : " + fb.D...
Next fb
Label1.Text += "</ul>" + vbLf
End If
'評価のサマリーの表示
Label1.Text += "<br />評価のサマリー:" + _
s.TotalFeedbackPages
If Not (s.SellerFeedback Is Nothing) Then
Label1.Text += "<ul>" + vbLf
Dim fb As SellerFeedbackDateRange
For Each fb In s.SellerFeedbackSummary
Label1.Text += "<li>評価期間 : " + fb...
Label1.Text += "<ul>" + vbLf
Dim r As SellerFeedbackDateRangeSelle...
For Each r In fb.SellerFeedbackRating
Label1.Text += "<li>評価 : " + r....
Label1.Text += "<br />評価数 : " ...
Label1.Text += "<br />割合 : " + _
r.Percentage + "%"
Next r
Label1.Text += "</ul>" + vbLf
Next fb
Label1.Text += "</ul>" + vbLf
End If
Next s
Label1.Text += "</ul>" + vbLf
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Amazon出品者情報の表示</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<label for="TextBox1">出品者のID : </label>
<asp:TextBox ID="TextBox1" runat="server"></asp:T...
<asp:Button ID="Button1" runat="server"
OnClick="Button1_Click" Text="送信" /><br />
</div>
</form>
<br />
<asp:Label ID="Label1" runat="server" EnableViewState...
</asp:Label>
</body>
</html>
}}
//これより下は編集しないでください
#pageinfo([[:Category/.NET]] [[:Category/ASP.NET]],2006-1...
終了行:
*SellerLookupのサンプルコード(VB.NET) [#e10f70d3]
ここで紹介しているコードは[[こちらのプロキシクラス>../../...
ここで紹介しているコードは[[こちらのC#のコード>../../CS/S...
Amazon.co.jpの出品者へのカスタマーからの評価やフィードバ...
#code(vbnet){{
<%@ Page Language="VB" %>
<%@ Import Namespace="Amazon.jp.v20060913" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional...
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Button1_Click(ByVal sender As Object, _
ByVal e As EventArgs)
Dim req As New SellerLookupRequest()
'出品者のIDを指定
req.SellerId = New String() {TextBox1.Text}
Dim sl As New SellerLookup()
'あなたのAccess Key ID
sl.AWSAccessKeyId = "(あなたのAccessKeyID)"
'あなたのAssociate ID
sl.AssociateTag = "dobonnet-22"
sl.Request = New SellerLookupRequest() {req}
Dim aws As New AWSECommerceService()
Dim res As SellerLookupResponse
Try
'SellerLookupオペレーションを実行し、結果を取得
res = aws.SellerLookup(sl)
Catch ex As Exception
Label1.Text = "エラー:" + Server.HtmlEncode(...
Return
End Try
If res Is Nothing OrElse res.Sellers Is Nothing T...
Label1.Text = "結果を取得できませんでした。"
Return
End If
If Not (res.Sellers(0).Request.Errors Is Nothing)...
Label1.Text = "エラー:" + _
res.Sellers(0).Request.Errors(0).Message
Return
End If
If res.Sellers(0).Seller Is Nothing Then
Label1.Text = "該当するSellerが見つかりません...
Return
End If
'結果を表示
Label1.Text = ""
Label1.Text += "<ul>" + vbLf
Dim s As Seller
For Each s In res.Sellers(0).Seller
Label1.Text += "<li><b><a href=""" + _
s.GlancePage + """>" + s.Nickname + "</a>...
If s.AverageFeedbackRatingSpecified Then
Label1.Text += "<br />過去1年間の評価 : "...
s.AverageFeedbackRating.ToString()
End If
Label1.Text += "<br />Seller Id : " + s.Selle...
Label1.Text += "<br />評価数:" + s.TotalFeed...
Label1.Text += "<br />評価ページ数:" + _
s.TotalFeedbackPages
'評価の表示
Label1.Text += "<br />最近の評価:" + _
s.TotalFeedbackPages
If Not (s.SellerFeedback Is Nothing) Then
Label1.Text += "<ul>" + vbLf
Dim fb As SellerFeedbackFeedback
For Each fb In s.SellerFeedback
Label1.Text += "<li>評価 : " + fb.Rat...
Label1.Text += "<br />コメント : " + ...
Label1.Text += "<br />評価した購入者...
fb.RatedBy
Label1.Text += "<br />日付 : " + fb.D...
Next fb
Label1.Text += "</ul>" + vbLf
End If
'評価のサマリーの表示
Label1.Text += "<br />評価のサマリー:" + _
s.TotalFeedbackPages
If Not (s.SellerFeedback Is Nothing) Then
Label1.Text += "<ul>" + vbLf
Dim fb As SellerFeedbackDateRange
For Each fb In s.SellerFeedbackSummary
Label1.Text += "<li>評価期間 : " + fb...
Label1.Text += "<ul>" + vbLf
Dim r As SellerFeedbackDateRangeSelle...
For Each r In fb.SellerFeedbackRating
Label1.Text += "<li>評価 : " + r....
Label1.Text += "<br />評価数 : " ...
Label1.Text += "<br />割合 : " + _
r.Percentage + "%"
Next r
Label1.Text += "</ul>" + vbLf
Next fb
Label1.Text += "</ul>" + vbLf
End If
Next s
Label1.Text += "</ul>" + vbLf
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Amazon出品者情報の表示</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<label for="TextBox1">出品者のID : </label>
<asp:TextBox ID="TextBox1" runat="server"></asp:T...
<asp:Button ID="Button1" runat="server"
OnClick="Button1_Click" Text="送信" /><br />
</div>
</form>
<br />
<asp:Label ID="Label1" runat="server" EnableViewState...
</asp:Label>
</body>
</html>
}}
//これより下は編集しないでください
#pageinfo([[:Category/.NET]] [[:Category/ASP.NET]],2006-1...
ページ名:
▲
▼
[
トップ
] [
新規
|
子ページ作成
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]