Summary概要Amazon Search Helper allows you to getting image of book, title, etc. from ISBN by looking up Amazon ECS at your ASP.NET Web Site.
Amazon Search Helper は、Amazon ECS を使ってISBNから本の表紙画像やタイトルなどを取得する機能をあなたのASP.NET Webサイトに容易に追加可能にします。
Quick Startクイックスタート
- 予め Amazon Web Services (AWS) の登録IDを取得(サインアップ)して、Amazon E-Commerce Service (AWS/ECS) にアクセスできる権限を獲得します。
- AWSにサインアップすることで、 API にアクセスするためのアクセスキーIDとシークレットアクセスキーが発行されるので、これを取得しておきます。参考URL: https://aws-portal.amazon.com/gp/aws/developer/account/index.html?ie=UTF8&action=access-key
- _AppStart.cshtml などアプリケーションの初期化のタイミングで、Amazon Search Helper に対して、上記で取得したアクセスキーIDとシークレットアクセスキーを知らせておきます。
@{
AmazonSearch.AccessKeyId = "<your access key id of AWS account here.>";
AmazonSearch.SecretAccessKey = "<your secret access key of AWS account here.>";
}
あとは任意のページ中で、Amazon Search Helper を呼び出して、ISBN から書籍情報を取り出して表示できます。
<div>Title = @AmazonSearch.LookupBook("9784873114798").Title</div>
<div>Manufacturer = @AmazonSearch.LookupBook("9784873114798").Manufacturer</div>
<div>ASIN = @AmazonSearch.LookupBook("9784873114798").ASIN</div>
@AmazonSearch.GetMediumImageHtml("9784873114798", new {Class="AnyCssClassName"})
Title = プログラマが知るべき97のこと
Manufacturer = オライリージャパン
ASIN = 4873114799
