Skip to content

Commit

Permalink
Add US pre-purcharse listing
Browse files Browse the repository at this point in the history
  • Loading branch information
Calyhre committed May 16, 2017
1 parent efb4fb7 commit 9fcd679
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/eshop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@ def self.list_asia

def self.list_americas
url = 'https://www.nintendo.com/json/content/get/filter/game'
disable_rails_query_string_format
default_params = {
limit: 40,
system: 'switch',
sort: 'title',
direction: 'asc',
availability: 'now',
availability: %w(now prepurchase),
shop: 'ncom',
}.freeze

Expand All @@ -95,6 +96,7 @@ def self.list_americas
# offset += limit
# end
return games.map do |game|
next unless game[:game_code] && game[:nsuid]
{
region: 'americas',
game_code: game[:game_code],
Expand All @@ -104,7 +106,7 @@ def self.list_americas
nsuid: game[:nsuid],
cover_url: game[:front_box_art],
}
end
end.compact
end
end

Expand Down

0 comments on commit 9fcd679

Please sign in to comment.