tag:crieit.net,2005:https://crieit.net/tags/Amazon/feed
「Amazon」の記事 - Crieit
Crieitでタグ「Amazon」に投稿された最近の記事
2023-07-25T20:16:30+09:00
https://crieit.net/tags/Amazon/feed
tag:crieit.net,2005:PublicArticle/18538
2023-07-25T20:16:30+09:00
2023-07-25T20:16:30+09:00
https://crieit.net/posts/Lisble-64bfaf0e5e2b7
シンプルな買い物リストアプリ「Lisble リスブル 」について
<h1 id="1. はじめに"><a href="#1.+%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB">1. はじめに</a></h1>
<p><strong>シンプルな買い物リスト・メモ - Lisble リスブル</strong><br />
アプリの解説・紹介をするために記事を書きました。</p>
<p><strong>シンプルな買い物リスト</strong>のアプリです。メモ、ToDoアプリとしても機能します。<strong>ログイン・ユーザー登録不要、無料</strong>ですぐにご利用いただけます。</p>
<p>「<strong>買い忘れ、衝動買い、同じものを買ってしまう、出先での在庫確認、ネットショップとの比較など</strong>」考える事が多く、余計な負担だったので、リストをつけることにより改善したいと思いました。<br />
<strong>購入履歴の保存機能</strong>は、<strong>在庫の備忘録</strong>にもなります。また買い物中の操作性を重視し、レイアウトの<strong>左/右切り替え</strong>が可能です。<br />
事前に買うべきものをメモしておくことで、より計画的に買い物をして、結果的に節約につながります。</p>
<h1 id="2. 買い物リストアプリ「Lisble リスブル 」について"><a href="#2.+%E8%B2%B7%E3%81%84%E7%89%A9%E3%83%AA%E3%82%B9%E3%83%88%E3%82%A2%E3%83%97%E3%83%AA%E3%80%8CLisble+%E3%83%AA%E3%82%B9%E3%83%96%E3%83%AB+%E3%80%8D%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6">2. 買い物リストアプリ「Lisble リスブル 」について</a></h1>
<p><a target="_blank" rel="nofollow noopener" href="https://lisble.net/about/"><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/2eb38bfc-0efc-d719-9baa-d0967308e507.png" alt="シンプルな買い物リスト-Lisble リスブル" width="350"></a></p>
<p><strong>『<a target="_blank" rel="nofollow noopener" href="https://lisble.net/about/">買い物リスト・メモ - Lisble リスブル</a>』</strong><br />
<div class="table-responsive"><table>
<thead>
<tr>
<th>iOS,PC</th>
<th>Android</th>
</tr>
</thead>
<tbody>
<tr>
<td><a src="https://lisble.net/about/" target="_blank" rel="noopener noreferrer" ><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/992c120a-33bd-48d1-93cd-d97fde42d22c.png" alt="シンプルな買い物リスト-Lisble リスブル" width="250"></a></td>
<td><a src="https://play.google.com/store/apps/details?id=net.lisble.twa" target="_blank" rel="noopener noreferrer" ><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/f92cdde6-21d1-2d3f-b8bf-9fb72a74abde.png" width=230 alt="googlePlayバッジ" ></a></td>
</tr>
<tr>
<td>iOS,PCの方は、PWAの為、メニューから <strong>「ホーム画面に追加」</strong> をお願いします。</td>
<td>このアプリは Google Play で入手できます。</td>
</tr>
</tbody>
</table></div></p>
<h2 id="2-1. アプリの概要"><a href="#2-1.+%E3%82%A2%E3%83%97%E3%83%AA%E3%81%AE%E6%A6%82%E8%A6%81">2-1. アプリの概要</a></h2>
<p>購入履歴が残せるシンプルな買い物リストのアプリです。メモ、ToDoアプリとしても機能します。<strong>ログイン・ユーザー登録不要、無料</strong>ですぐにご利用できます。</p>
<div class="table-responsive"><table>
<thead>
<tr>
<th>About</th>
<th>List</th>
<th>History</th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/01ff7a29-9672-8717-161b-807bfd85f014.png" alt="Aboutページのスクリーンショット.png" width="120" height=""></td>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/1e53b87e-f6d3-8ef8-8646-f66b8c02dbb2.png" alt="リストページのスクリーンショット" width="120" height=""></td>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/64e97b97-f950-2f48-e346-63a506643401.png" alt="履歴ページのスクリーンショット" width="120" height=""></td>
</tr>
</tbody>
</table></div>
<h2 id="2-2. アプリの3つの特徴"><a href="#2-2.+%E3%82%A2%E3%83%97%E3%83%AA%E3%81%AE3%E3%81%A4%E3%81%AE%E7%89%B9%E5%BE%B4">2-2. アプリの3つの特徴</a></h2>
<p><strong>① 買い物中の操作性(UI,UX)</strong><br />
片手操作での誤操作防止のため編集機能を片側に寄せ、かつ <strong>左/右 表示切替可能</strong>。<br />
チェックしたメモ、まだしていないメモを切り替え、すぐに確認できるようにしました。</p>
<p><strong>② 購入履歴の保存</strong><br />
<strong>日付時間と共に保存</strong>をして、入力時に同一品目を色の変化でお知らせをします。<br />
購入履歴を残すことにより、直近で購入したものがわかり、無駄な重複買いと共に在庫を思い出すきっかけにもなると思いました。</p>
<p><strong>③ Amazon検索</strong><br />
入力したメモをそのまま<strong>Amazon検索</strong>できます。買い物中の値段の比較や、欲しいものリストとしてご活用してもらえればと思いました。</p>
<h2 id="2-3. アプリの画面案内"><a href="#2-3.+%E3%82%A2%E3%83%97%E3%83%AA%E3%81%AE%E7%94%BB%E9%9D%A2%E6%A1%88%E5%86%85">2-3. アプリの画面案内</a></h2>
<div class="table-responsive"><table>
<thead>
<tr>
<th></th>
<th>スマホ</th>
</tr>
</thead>
<tbody>
<tr>
<td>① <strong>購入履歴へ</strong> ② <strong>メニュー</strong>(移動・設定) ③ <strong>タブ切り替え</strong> ④ <strong>↑↓並べ替え</strong> ④ <strong>←色、→削除</strong> ⑤ <strong>編集</strong> ⑥ <strong>チェック</strong> ⑦ <strong>リスト追加</strong> ⑧ <strong>「チェックあり」のみ削除</strong> ⑨ <strong>すべて削除</strong></td>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/bb63d0a7-c937-4b2b-e913-8230c118d9fb.png" alt="スクリーンショット" width="350" height=""></td>
</tr>
</tbody>
</table></div>
<div class="table-responsive"><table>
<thead>
<tr>
<th></th>
<th>タブレット・PC</th>
</tr>
</thead>
<tbody>
<tr>
<td>① <strong>編集</strong> ② <strong>色</strong> ③ <strong>削除</strong> ④ ↑↓ <strong>並べ替えのみ</strong></td>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/a75aec69-901c-d87e-0411-b5c40e23b409.png" alt="スクリーンショット" width="405" height=""></td>
</tr>
</tbody>
</table></div>
<h2 id="2-4. アプリの基本操作"><a href="#2-4.+%E3%82%A2%E3%83%97%E3%83%AA%E3%81%AE%E5%9F%BA%E6%9C%AC%E6%93%8D%E4%BD%9C">2-4. アプリの基本操作</a></h2>
<p>①②③これらの手順だけで簡単操作<br />
<div class="table-responsive"><table>
<thead>
<tr>
<th></th>
<th>基本操作</th>
</tr>
</thead>
<tbody>
<tr>
<td>① <strong>リスト作成</strong> ② <strong>買い物完了でチェック</strong> ③ <strong>チェック済みを削除</strong> ※これらの手順だけで簡単操作</td>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/33bc7e8d-e258-bdbd-85e4-affb6c585cd9.gif" alt="買い物リスト-lisble リスブルの基本操作" width="160" ></td>
</tr>
</tbody>
</table></div></p>
<h2 id="2-5. アプリの機能一覧"><a href="#2-5.+%E3%82%A2%E3%83%97%E3%83%AA%E3%81%AE%E6%A9%9F%E8%83%BD%E4%B8%80%E8%A6%A7">2-5. アプリの機能一覧</a></h2>
<div class="table-responsive"><table>
<thead>
<tr>
<th>並び替え機能</th>
<th>スワイプ</th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/30495dd3-fec4-c791-cb39-a1c09f78003d.gif" alt="買い物リスト-lisble リスブルの並べ替え動作" width="150" height=""></td>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/cb611a1f-9124-472b-1a26-b7c4f53f8ecc.gif" alt="買い物リスト-lisble リスブルのスワイプ動作" width="150" height=""></td>
</tr>
<tr>
<td></td>
<td>←<strong>色</strong> →<strong>削除</strong>※タッチデバイスのみ</td>
</tr>
</tbody>
</table></div>
<div class="table-responsive"><table>
<thead>
<tr>
<th>タブ切り替え</th>
<th>Amazon検索</th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/db8c743b-1789-98a7-0c26-82adbef8733e.gif" alt="買い物リスト-lisble リスブルのタブ動作" width="150" height=""></td>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/e0d457fa-a1c3-3b28-b90e-fe67f86ffba6.png" alt="買い物リスト-lisble Amazon検索のイメージ" width="170" height=""></td>
</tr>
<tr>
<td><strong>すべて、チェックあり、なし</strong></td>
<td>そのまま<strong>Amazon検索</strong></td>
</tr>
</tbody>
</table></div>
<div class="table-responsive"><table>
<thead>
<tr>
<th>購入履歴の保存</th>
<th>重複買い防止</th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/4c03d104-0d05-234f-f56b-ff150451077a.gif" alt="買い物リスト-lisble リスブルの買い物履歴・削除動作" width="150" height=""></td>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/72a81f65-8c27-f1cb-84c5-74fbf3d8680b.gif" alt="買い物リスト-lisble リスブルの重複購入防止動作" width="150" height=""></td>
</tr>
<tr>
<td><strong>1. チェックあり削除</strong> <strong>2. 購入履歴の保存</strong></td>
<td>履歴と同じ品目を入力時に<strong>色の変化</strong>でお知らせ</td>
</tr>
</tbody>
</table></div>
<div class="table-responsive"><table>
<thead>
<tr>
<th>続けて追加</th>
<th>全削除</th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/93b63cdc-c10b-5f6c-c8c6-18bdfe229f2c.png" alt="追加ボタン" width="50" height=""></td>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/9e640615-6745-b110-9de7-37df2827ba6f.png" alt="全削除ボタン" width="100" height=""></td>
</tr>
<tr>
<td><strong>+ボタン、ENTERキー</strong></td>
<td>チェック済みは<strong>購入履歴に保存</strong></td>
</tr>
</tbody>
</table></div>
<h2 id="2-6. アプリの設定"><a href="#2-6.+%E3%82%A2%E3%83%97%E3%83%AA%E3%81%AE%E8%A8%AD%E5%AE%9A">2-6. アプリの設定</a></h2>
<div class="table-responsive"><table>
<thead>
<tr>
<th>テーマカラー</th>
<th>レイアウト</th>
<th>多言語</th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/e1de9ced-0089-d47b-9108-45c7354bf927.png" alt="買い物リスト-lisble リスブルのテーマカラー5種" width="150" height=""></td>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/31cc5133-da53-b9e0-6419-6fbc7fe6fda6.png" alt="買い物リスト-lisble リスブルのレイアウトの左/右切り替え" width="150" height=""></td>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/f318e886-f667-3430-e50b-0a36c2eccb27.png" alt="買い物リスト-lisble リスブルの英語表示" width="129" height=""></td>
</tr>
<tr>
<td>5種</td>
<td>片手操作での誤操作防止(<strong>左利き</strong>)</td>
<td><strong>日本語</strong> / <strong>英語</strong></td>
</tr>
</tbody>
</table></div>
<div class="table-responsive"><table>
<thead>
<tr>
<th>自動削除</th>
<th>入力中のEnterキー操作</th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/cca8e553-c7bf-fd06-99b6-c5fee6f0fa1b.png" alt="買い物リスト-lisble リスブルの自動削除機能" width="150" height=""></td>
<td><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/63a179fc-2df2-5456-8ae4-d2565ed27ad9.png" alt="買い物リスト-lisble リスブルの入力中のEnterKeyの挙動" width="150" height=""></td>
</tr>
<tr>
<td>終了時に「<strong>チェックあり</strong>」を<strong>自動削除(保存)機能</strong></td>
<td><strong>追加</strong> / <strong>改行</strong> 切り替え</td>
</tr>
</tbody>
</table></div>
<hr />
<h1 id="3. 最後に"><a href="#3.+%E6%9C%80%E5%BE%8C%E3%81%AB">3. 最後に</a></h1>
<p><strong>購入履歴</strong>が残せるシンプルな買い物リストアプリ 『<strong>買い物リスト - Lisble リスブル</strong>』 です。メモ、ToDoアプリとしても機能します。<br />
<strong>購入履歴の保存機能</strong>により、無駄な重複購入を防ぎ、在庫の備忘録にもなります。<br />
<strong>ログイン・ユーザー登録不要、無料</strong>ですぐにご利用いただけます。<br />
もしよかったら、触ってみてください。</p>
<p><strong>『<a target="_blank" rel="nofollow noopener" href="https://lisble.net/about/">買い物リスト・メモ - Lisble リスブル</a>』</strong><br />
<div class="table-responsive"><table>
<thead>
<tr>
<th>iOS,PC</th>
<th>Android</th>
</tr>
</thead>
<tbody>
<tr>
<td><a src="https://lisble.net/about/" target="_blank" rel="noopener noreferrer" ><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/992c120a-33bd-48d1-93cd-d97fde42d22c.png" alt="シンプルな買い物リスト-lisble リスブル" width="250"></a></td>
<td><a src="https://play.google.com/store/apps/details?id=net.lisble.twa" target="_blank" rel="noopener noreferrer" ><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/906025/f92cdde6-21d1-2d3f-b8bf-9fb72a74abde.png" width=230 alt="googlePlayバッジ" ></a></td>
</tr>
<tr>
<td>iOS,PCの方は、PWAの為、メニューから <strong>「ホーム画面に追加」</strong> をお願いします。</td>
<td>このアプリは Google Play で入手できます。</td>
</tr>
</tbody>
</table></div></p>
<hr />
<p>Google Play および Google Play ロゴは、Google LLC の商標です。</p>
Arieight
tag:crieit.net,2005:PublicArticle/18022
2022-02-10T15:38:06+09:00
2022-02-10T15:38:06+09:00
https://crieit.net/posts/Amazon
Amazonストアアプリが64ビット未対応と判定されたときの対応
<p><a href="https://crieit.now.sh/upload_images/102987c114f9b1e508737466a3de78196204a7b41772d.gif" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/102987c114f9b1e508737466a3de78196204a7b41772d.gif?mw=700" alt="image" /></a><br />
Amazon Fire用アプリ「9VAeきゅうべえ」に、MP4動画出力機能をつけたとろ、「64ビット対応していない」との判定がでるようになり、新しい Amazon Fire が対象外になってしまった。最新の Amazon Fire は32ビットアプリが動かないみたいだ。</p>
<p>しかし、同時に作成した、Googleストアアプリは、ちゃんと64ビット対応している。</p>
<p>Googleストアには、AABで登録し、Amazonは、APKで登録する。AndroidStudio は、AABもAPKも出力できる。その APK をみてみると、ちゃんと、ARM64ビット、Intel 64ビットがはいっていた。</p>
<p>よりくわしく見てみると、32ビット版ライブラリの数が多かった。64ビット版に同じライブラリがないため、未対応と判定するみたい。</p>
<p>違っているライブラリには、NEONという名前がついていた。NEONは、SIMD演算で動画を高速処理するためにつかわれる。32ビット版CPUには、SIMD演算できないものがあるため、ライブラリが追加されているみたいだ。そのため動画出力をいれると、64ビット未対応と判定されるようになった。</p>
<p>それで結局、つぎのような3本のAPKを作成すると、全機種サポートできるようになった。</p>
<ol>
<li>動画出力を除いたAPK >> 32ビット・64ビット 兼用APKとして認識される</li>
<li>動画出力つきAPK >>32ビット用APKとして認識される</li>
<li>64ビットのみの動画出力つきAPK>> 64ビット用APKとして認識される</li>
</ol>
<p><a target="_blank" rel="nofollow noopener" href="https://dnjiro.hatenablog.com/entry/2019/12/11/000255">そこらへんの対応記事をこちらに書きました</a></p>
Danjiro Daiwa
tag:crieit.net,2005:PublicArticle/15750
2020-03-07T17:25:02+09:00
2020-03-07T17:25:02+09:00
https://crieit.net/posts/PAAPI-v5-Node-js
PAAPI v5に移行してみた: Node.js版
<p><a target="_blank" rel="nofollow noopener" href="https://tsundoku.site">積読ハウマッチ</a>でAmazonのPAAPIを使っているけど、<br />
v4が2020年3月9日に利用できなくなるため、移行してみたときの備忘録。</p>
<p><a href="https://crieit.now.sh/upload_images/e5449de49d37c0a93ce3ada90eb537335e635a1adaf4b.png" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/e5449de49d37c0a93ce3ada90eb537335e635a1adaf4b.png?mw=700" alt="スクリーンショット 2020-03-07 17.12.50.png" /></a></p>
<p>以前は、<a target="_blank" rel="nofollow noopener" href="https://github.com/dmcquay/node-apac">node-apac</a>を使ってたけど、<a target="_blank" rel="nofollow noopener" href="https://github.com/dmcquay/node-apac/issues/97">対応はなさそう</a>。</p>
<h2 id="Amazon側の移行手順"><a href="#Amazon%E5%81%B4%E3%81%AE%E7%A7%BB%E8%A1%8C%E6%89%8B%E9%A0%86">Amazon側の移行手順</a></h2>
<p><a target="_blank" rel="nofollow noopener" href="https://affiliate.amazon.co.jp/help/node/topic/GZH32YX29UH5GACM">公式の移行手順</a>を参考に進める感じ。</p>
<h3 id="ステップ1: 新しい認証情報を取得する"><a href="#%E3%82%B9%E3%83%86%E3%83%83%E3%83%971%EF%BC%9A+%E6%96%B0%E3%81%97%E3%81%84%E8%AA%8D%E8%A8%BC%E6%83%85%E5%A0%B1%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B">ステップ1: 新しい認証情報を取得する</a></h3>
<p>認証情報の形式が古いと払い出しが必要らしい<br />
いままで使っていたアクセスキーとシークレットキーでOKだったのでスキップ</p>
<h3 id="ステップ2: PA-API 5.0を試してみる"><a href="#%E3%82%B9%E3%83%86%E3%83%83%E3%83%972%EF%BC%9A+PA-API+5.0%E3%82%92%E8%A9%A6%E3%81%97%E3%81%A6%E3%81%BF%E3%82%8B">ステップ2: PA-API 5.0を試してみる</a></h3>
<p>以前と同様、Scratchpadが用意されている。<br />
アクセスキーがOKだったかも、ここで確認した。<br />
・<a target="_blank" rel="nofollow noopener" href="https://webservices.amazon.com/paapi5/scratchpad/index.html">Product Advertising API 5.0 Scratchpad</a></p>
<h3 id="ステップ3: 必要な知識を得る"><a href="#%E3%82%B9%E3%83%86%E3%83%83%E3%83%973%EF%BC%9A+%E5%BF%85%E8%A6%81%E3%81%AA%E7%9F%A5%E8%AD%98%E3%82%92%E5%BE%97%E3%82%8B">ステップ3: 必要な知識を得る</a></h3>
<p>公式ドキュメントにも書いてあるとおり、レスポンスがXMLからJSONになったらしい。</p>
<p>変更点は、<a target="_blank" rel="nofollow noopener" href="https://webservices.amazon.com/paapi5/documentation/migration-guide/whats-new-in-paapi5.html">ここ</a>にまとまっている。<br />
主には、セキュリティ強化、レスポンス速度の改善、新しいAPIの追加など。</p>
<p>また、レスポンスに関してv4からv5へのマッピングも用意されてる。<br />
・<a target="_blank" rel="nofollow noopener" href="https://webservices.amazon.com/paapi5/documentation/migration-guide/pa-api-40-to-50-mapping.html">PA-API 4.0 to 5.0 Mapping · Product Advertising API 5.0</a></p>
<h3 id="ステップ4: PA-API 5.0を導入する"><a href="#%E3%82%B9%E3%83%86%E3%83%83%E3%83%974%EF%BC%9A+PA-API+5.0%E3%82%92%E5%B0%8E%E5%85%A5%E3%81%99%E3%82%8B">ステップ4: PA-API 5.0を導入する</a></h3>
<p>従来どおり、Web APIを直接叩けるけど、SDKも提供されている。<br />
言語は、Java / Node.js / PHP / Pythonの4つ。サンプルもある。<br />
・<a target="_blank" rel="nofollow noopener" href="https://webservices.amazon.com/paapi5/documentation/quick-start/using-sdk.html">Using SDK · Product Advertising API 5.0</a></p>
<p>ただ、残念なことに、Node.jsのSDKは、zipで公開されている...</p>
<h2 id="ソース側の移行手順"><a href="#%E3%82%BD%E3%83%BC%E3%82%B9%E5%81%B4%E3%81%AE%E7%A7%BB%E8%A1%8C%E6%89%8B%E9%A0%86">ソース側の移行手順</a></h2>
<h3 id="SDKを配置"><a href="#SDK%E3%82%92%E9%85%8D%E7%BD%AE">SDKを配置</a></h3>
<p>zipをダウンロードして展開するとこんな感じになってる。</p>
<p><a href="https://crieit.now.sh/upload_images/07628c2b1f8ec3ae587e9d119d743d6a5e635a2951165.png" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/07628c2b1f8ec3ae587e9d119d743d6a5e635a2951165.png?mw=700" alt="スクリーンショット 2020-03-07 17.11.09.png" /></a></p>
<p>src配下がAPIなので、自分のソースに配置。</p>
<p><a href="https://crieit.now.sh/upload_images/35f1b70ec8ce6466124c642bb991527e5e635a37ecdf3.png" target="_blank" rel="nofollow noopener"><img src="https://crieit.now.sh/upload_images/35f1b70ec8ce6466124c642bb991527e5e635a37ecdf3.png?mw=700" alt="スクリーンショット 2020-03-07 6.06.05.png" /></a></p>
<p>dependencyがあるので、それもコピペして、<code>npm i</code>する</p>
<pre><code class="json">"dependencies": {
"superagent": "3.5.2",
"crypto-js": "^3.1.9-1"
},
</code></pre>
<h3 id="APIの呼び出し"><a href="#API%E3%81%AE%E5%91%BC%E3%81%B3%E5%87%BA%E3%81%97">APIの呼び出し</a></h3>
<p>解答したzipにサンプルがあるので、それを見ながら実装していく。<br />
使っているのは検索なので、<code>sampleSearchItemsApi.js</code>を参照。</p>
<p>以下は、サンプルの抜粋</p>
<pre><code class="javascript">// ** API Clientの準備
var ProductAdvertisingAPIv1 = require('./src/index');
var defaultClient = ProductAdvertisingAPIv1.ApiClient.instance;
// アクセスキーなどを設定。ホストとかリージョンは、以下を参照
// https://webservices.amazon.com/paapi5/documentation/common-request-parameters.html#host-and-region
defaultClient.accessKey = '<YOUR ACCESS KEY>';
defaultClient.secretKey = '<YOUR SECRET KEY>';
defaultClient.host = 'webservices.amazon.co.jp';
defaultClient.region = 'us-west-2';
// ** リクエストの生成
var searchItemsRequest = new ProductAdvertisingAPIv1.SearchItemsRequest();
// アソシエイトタグを設定
searchItemsRequest['PartnerTag'] = '<YOUR PARTNER TAG>';
searchItemsRequest['PartnerType'] = 'Associates';
// 検索リクエストを設定。SearchIndexは以下を参照
// https://webservices.amazon.com/paapi5/documentation/use-cases/organization-of-items-on-amazon/search-index.html
searchItemsRequest['Keywords'] = 'Harry Potter';
searchItemsRequest['SearchIndex'] = 'Books';
searchItemsRequest['ItemCount'] = 2;
// 取得するレスポンスの指定
// https://webservices.amazon.com/paapi5/documentation/search-items.html#resources-parameter
searchItemsRequest['Resources'] = ['Images.Primary.Medium', 'ItemInfo.Title', 'Offers.Listings.Price'];
// ** コールバックの設定
var callback = function (error, data, response) {
if (error) {
// エラーの場合
console.log('Status Code: ' + error['status']);
} else {
// レスポンスを取得
var searchItemsResponse = ProductAdvertisingAPIv1.SearchItemsResponse.constructFromObject(data);
if (searchItemsResponse['SearchResult'] !== undefined) {
// 1件目の結果を取得
var item_0 = searchItemsResponse['SearchResult']['Items'][0];
if (item_0 !== undefined && item_0['ASIN'] !== undefined) {
console.log('ASIN: ' + item_0['ASIN']);
}
}
// エラーが返ってきた場合
if (searchItemsResponse['Errors'] !== undefined) {
var error_0 = searchItemsResponse['Errors'][0];
console.log('Error Code: ' + error_0['Code']);
console.log('Error Message: ' + error_0['Message']);
}
}
};
// ** APIの実行
var api = new ProductAdvertisingAPIv1.DefaultApi();
try {
api.searchItems(searchItemsRequest, callback);
} catch (ex) {
console.log('Exception: ' + ex);
}
</code></pre>
<h2 id="対応が必要だった点"><a href="#%E5%AF%BE%E5%BF%9C%E3%81%8C%E5%BF%85%E8%A6%81%E3%81%A0%E3%81%A3%E3%81%9F%E7%82%B9">対応が必要だった点</a></h2>
<p>基本的にパラメタがわかったため、一致してるものを探していけばOK。<br />
変更自体はそこまでだけど、できることが変わっているので注意...</p>
<h3 id="リクエスト関連"><a href="#%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E9%96%A2%E9%80%A3">リクエスト関連</a></h3>
<ul>
<li>MerchantIdがMerchantになっていた。設定値は変わらず</li>
<li>SortがSortyByになり、設定値も変更</li>
<li>PowerSearchが廃止に...つまり、除外や期間指定ができない</li>
</ul>
<h3 id="レスポンス関連"><a href="#%E3%83%AC%E3%82%B9%E3%83%9D%E3%83%B3%E3%82%B9%E9%96%A2%E9%80%A3">レスポンス関連</a></h3>
<ul>
<li>全体的に変更。XMLからJSONになっており、構成も変わっている</li>
<li>発売日がUTCになり、時刻まで記載</li>
<li>エラーメッセージも全体的に変わっているので対応が必要</li>
<li>バリエーションが除外され、GetVariations APIが新設(リクエスト数が増...)</li>
<li>ただ、電子書籍の価格が取得できるようになった</li>
</ul>
<h2 id="よく参照したURL"><a href="#%E3%82%88%E3%81%8F%E5%8F%82%E7%85%A7%E3%81%97%E3%81%9FURL">よく参照したURL</a></h2>
<p>とにかく、以下を読みまくった。。</p>
<ul>
<li>Operations関連: リクエストパラメタとか。指定できるレスポンスもここ
<ul>
<li><a target="_blank" rel="nofollow noopener" href="https://webservices.amazon.com/paapi5/documentation/search-items.html">SearchItems</a> ... 検索</li>
<li><a target="_blank" rel="nofollow noopener" href="https://webservices.amazon.com/paapi5/documentation/get-items.html">GetItems</a> ... ASINから商品情報取得</li>
<li><a target="_blank" rel="nofollow noopener" href="https://webservices.amazon.com/paapi5/documentation/get-variations.html">GetVariations</a> ... ASINからバリエーション情報取得</li>
</ul></li>
<li>Resource関連: レスポンスの内容
<ul>
<li><a target="_blank" rel="nofollow noopener" href="https://webservices.amazon.com/paapi5/documentation/item-info.html">ItemInfo</a> ... 商品情報</li>
<li><a target="_blank" rel="nofollow noopener" href="https://webservices.amazon.com/paapi5/documentation/images.html">Images</a> ... 画像関連</li>
<li><a target="_blank" rel="nofollow noopener" href="https://webservices.amazon.com/paapi5/documentation/offers.html">Offers</a> ... 価格関連</li>
</ul></li>
<li>共通のリクエストパラメタ関連
<ul>
<li><a target="_blank" rel="nofollow noopener" href="https://webservices.amazon.com/paapi5/documentation/locale-reference/japan.html">日本のMarketplaceとかの情報</a></li>
<li><a target="_blank" rel="nofollow noopener" href="https://webservices.amazon.com/paapi5/documentation/common-request-parameters.html#host-and-region">共通のリクエストパラメタ</a> ... HostやRegionもここ</li>
</ul></li>
<li>共通のレスポンス関連
<ul>
<li><a target="_blank" rel="nofollow noopener" href="https://webservices.amazon.com/paapi5/documentation/troubleshooting/error-messages.html">エラーメッセージ</a></li>
</ul></li>
<li>マイグレーション関連
<ul>
<li><a target="_blank" rel="nofollow noopener" href="https://affiliate.amazon.co.jp/help/node/topic/GZH32YX29UH5GACM">v5.0への移行ガイドの日本語版</a></li>
<li><a target="_blank" rel="nofollow noopener" href="https://webservices.amazon.com/paapi5/documentation/migration-guide/pa-api-40-to-50-mapping.html">v4.0からv5.0へのマッピング</a></li>
<li><a target="_blank" rel="nofollow noopener" href="https://webservices.amazon.com/paapi5/documentation/play-around-using-scratchpad.html">Scratchpadの使い方</a></li>
</ul></li>
</ul>
<p>以上!!</p>
<h2 id="こんなのつくってます!!"><a href="#%E3%81%93%E3%82%93%E3%81%AA%E3%81%AE%E3%81%A4%E3%81%8F%E3%81%A3%E3%81%A6%E3%81%BE%E3%81%99%21%21">こんなのつくってます!!</a></h2>
<p>積読用の読書管理アプリ 『積読ハウマッチ』をリリースしました!<br />
<a target="_blank" rel="nofollow noopener" href="https://tsundoku.site">積読ハウマッチ</a>は、Nuxt.js+Firebaseで開発してます!</p>
<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/478782/572d4947-f40b-e4dc-1c9c-bc584cd2a66c.png" width="200"/></p>
<p>もしよかったら、遊んでみてくださいヽ(=´▽`=)ノ</p>
<p>要望・感想・アドバイスなどあれば、<br />
公式アカウント(<a target="_blank" rel="nofollow noopener" href="https://twitter.com/MemoryLoverz">@MemoryLoverz</a>)や開発者(<a target="_blank" rel="nofollow noopener" href="https://twitter.com/kira_puka">@kira_puka</a>)まで♪</p>
きらぷか@積読ハウマッチ/SSSAPIなど
tag:crieit.net,2005:PublicArticle/14570
2018-10-19T02:53:55+09:00
2020-01-01T07:33:47+09:00
https://crieit.net/posts/Amazon-SNS
Amazon SNS ギフト券は優れた投げ銭プラットフォーム
<h2 id="もっと気軽に投げ銭したい"><a href="#%E3%82%82%E3%81%A3%E3%81%A8%E6%B0%97%E8%BB%BD%E3%81%AB%E6%8A%95%E3%81%92%E9%8A%AD%E3%81%97%E3%81%9F%E3%81%84">もっと気軽に投げ銭したい</a></h2>
<p>現在(2018/10/19)、<a href="https://crieit.net/">Crieit</a>では、投げ銭方法として「ビットコイン」と「モナコイン」が利用できるようになっています。</p>
<p>ですが、私は両方ともウォレットを所持しておらず、また、日本円をビットコインやモナコインと相互換金するための暗号通貨口座も持ち合わせていません。</p>
<p>そこで、代替手段として<strong>Amazon ギフト券(E メールタイプ)</strong> を提案します。</p>
<h2 id="投げ銭が容易な「Amazon ギフト券(E メールタイプ)」"><a href="#%E6%8A%95%E3%81%92%E9%8A%AD%E3%81%8C%E5%AE%B9%E6%98%93%E3%81%AA%E3%80%8CAmazon+%E3%82%AE%E3%83%95%E3%83%88%E5%88%B8%28E+%E3%83%A1%E3%83%BC%E3%83%AB%E3%82%BF%E3%82%A4%E3%83%97%29%E3%80%8D">投げ銭が容易な「Amazon ギフト券(E メールタイプ)」</a></h2>
<p><strong>プログラマー、クリエイターならさすがに Amazon アカウントは持っているだろう</strong>という希望的観測により、<strong>Amazon ギフト券で投げ銭</strong>できれば、いつものポチり感覚で投げ銭できるのではないかと考えました。</p>
<p>Amazon ギフト券(E メールタイプ)は15円~50万円まで1円単位で金額を指定でき、かつ手数料を取られないこともメリットです。</p>
<h2 id="高い、高すぎる「メールアドレス」という壁"><a href="#%E9%AB%98%E3%81%84%E3%80%81%E9%AB%98%E3%81%99%E3%81%8E%E3%82%8B%E3%80%8C%E3%83%A1%E3%83%BC%E3%83%AB%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%E3%80%8D%E3%81%A8%E3%81%84%E3%81%86%E5%A3%81">高い、高すぎる「メールアドレス」という壁</a></h2>
<p>しかし、Amazon ギフト券( E メールタイプ) は贈る相手のメールアドレスを知っていなければいけません。<br />
ですが昨今のネットコミュニティにおいて、<strong>メールアドレスを晒すという行為は危険を伴う</strong>という認識が強く、同人作家へメールアドレスでアクセスするのは困難を極めます。</p>
<h2 id="救世主"><a href="#%E6%95%91%E4%B8%96%E4%B8%BB">救世主</a></h2>
<p>しかし、Amazon ギフト券( E メールタイプ) には「<strong>メッセージアプリでシェア</strong>」という機能が実装されました。<br />
これは、Amazon ギフト券を URL(すなわちリンク)の提示のみでリンクを踏んだユーザに Amazon ギフト券(E メールタイプ)を差し上げることができる機能です。</p>
<p><a target="_blank" rel="nofollow noopener" href="https://www.amazon.co.jp//dp/B004N3APGO/">Eメールタイプ Amazonギフト券購入ページ</a></p>
<h2 id="弱点"><a href="#%E5%BC%B1%E7%82%B9">弱点</a></h2>
<p>「メッセージアプリでシェア」方式では、<strong>最初に URL を踏んだ人が強奪できる仕様</strong>のようなので[要出展]、Twitter の投稿などに URL を公開すると<strong>早い者勝ちで Amazon ギフト券を争奪してしまう</strong>ということになります。</p>
<p>このため、Twitter 等で用いる場合にはダイレクトメッセージを使うなどの工夫が必要です。<br />
逆に言うと、<strong>1対1のプライベートなメッセージ交換ができるのであれば、SNS のダイレクトメッセージであろうが SMS であろうが Qiita の非公開記事であろうが投げ銭をすることが可能</strong>という、匿名性の高い投げ銭が可能になります。</p>
<p>ただし、ここでも一つ問題があり、<strong>投げ銭を送る側の Amazon アカウント名が相手に伝わってしまう</strong>ことが挙げられます。<br />
<strong>誰から贈られたギフト券であるか</strong>が受け取り時に表示されるためです。この問題に対する解決策は、目下調査中です。</p>
<p>また、<strong>相手がアンチ Amazon</strong>の場合には利用できない(=受け取ってもらえない)ことも弱点と言えるでしょう。</p>
<p>さらに、<a href="https://crieit.net/">Crieit</a>における「ビットコイン」や「モナコイン」のように<strong>クリック一発で投げ銭できない</strong>というのもハードルが高く、また、クレジットカードが必須であることもハードルを上げています。</p>
<h2 id="容易な投げ銭でクリエイターを支える文化を"><a href="#%E5%AE%B9%E6%98%93%E3%81%AA%E6%8A%95%E3%81%92%E9%8A%AD%E3%81%A7%E3%82%AF%E3%83%AA%E3%82%A8%E3%82%A4%E3%82%BF%E3%83%BC%E3%82%92%E6%94%AF%E3%81%88%E3%82%8B%E6%96%87%E5%8C%96%E3%82%92">容易な投げ銭でクリエイターを支える文化を</a></h2>
<p>先日も Twitter で「<strong>もっとお金払うから、新作書いてよ! もっとあなたの作品を読みたいよ!</strong>」のような投稿が話題になりましたが、日本ではまだまだ「<strong>作品への対価としてしかクリエイターへの課金方法がない</strong>」ケースが多く見られるように感じます。</p>
<p>私の提案する<strong>Amazon ギフト券(E メールタイプ)</strong> の普及によって、より多くのファンが<strong>クリエイターを応援したい気持ちを経済的に表すことができる</strong>ことで、より多くの作品の発表や返報性を満たすことができ、喜びを分かち合える世界になればいいなと考えています。</p>
hidao