Last active
December 1, 2017 04:31
Revisions
-
atton revised this gist
Dec 1, 2017 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,4 @@ require 'amazon/ecs' Amazon::Ecs.configure do |options| options[:subscription_id] = options[:AWS_access_key_id] = 'hoge' options[:AWS_secret_key] = 'fuga' -
atton revised this gist
Dec 1, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ API_END_POINT = 'https://app.rakuten.co.jp/services/api/Kobo/EbookSearch/20170426' APPLICATION_ID = 'hoge' AFFILIATE_ID = 'fuga' ElementInformations = ['largeImageUrl', 'title', 'affiliateUrl', 'itemPrice', 'publisherName'] -
atton revised this gist
Dec 1, 2017 . 2 changed files with 8 additions and 7 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,8 @@ result = Amazon::Ecs.send_request({response_group: 'Images,ItemAttributes,Large', operation: 'ItemSearch', browse_node: '2293143051', minimum_price: 0, maximum_price: 0, search_index: 'Books' marketplace: 'jp'}) # return items This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,10 @@ require 'amazon/ecs' require 'amazon/ecs' Amazon::Ecs.configure do |options| options[:subscription_id] = options[:AWS_access_key_id] = 'hoge' options[:AWS_secret_key] = 'fuga' options[:associate_tag] = 'piyo' end result = Amazon::Ecs.send_request({response_group: 'Images,ItemAttributes,Large', operation: 'ItemSearch', browse_node: '2293143051', -
atton revised this gist
Dec 1, 2017 . 2 changed files with 34 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,9 @@ require 'amazon/ecs' Amazon::Ecs.configure do |options| options[:subscription_id] = options[:AWS_access_key_id] = 'hoge' options[:AWS_secret_key] = 'fuga' options[:associate_tag] = 'piyo' end result = Amazon::Ecs.send_request({response_group: 'Images,ItemAttributes,Large', operation: 'ItemSearch', browse_node: '2293143051', This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ API_END_POINT = 'https://app.rakuten.co.jp/services/api/Kobo/EbookSearch/20170426' APPLICATION_ID = 'hoge' AFFILIATE_ID = 'fuga'1633e485.3da3cbfa.1633e486.309d4714' ElementInformations = ['largeImageUrl', 'title', 'affiliateUrl', 'itemPrice', 'publisherName'] DefaultOpts = {affiliateId: AFFILIATE_ID, applicationId: APPLICATION_ID, elements: ElementInformations.join(','), formatVersion: 2, field: 0, hits: 30, koboGenreId: 101, language: 'JA', salesType: 0, sort: '+itemPrice'} def post hash uri = URI.parse(API_END_POINT) https = Net::HTTP.new(uri.host, 443) https.use_ssl = true path = uri.path path += '?' path += URI.encode_www_form(DefaultOpts.merge(hash)) request = Net::HTTP::Post.new(path) https.request(request) end post(1) # request 1 page -
atton created this gist
Nov 30, 2017 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ require 'amazon/ecs' result = Amazon::Ecs.send_request({response_group: 'Images,ItemAttributes,Large', operation: 'ItemSearch', browse_node: '2293143051', minimum_price: 0, maximum_price: 0, search_index: 'Books' marketplace: 'jp'}) This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ require 'amazon/ecs' result = Amazon::Ecs.send_request({response_group: 'Images,ItemAttributes,Large', operation: 'ItemSearch', browse_node: '2293143051', minimum_price: 0, maximum_price: 0, search_index: 'Books'})