Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(store): add game store, add ps5 for uk stores #736

Merged
merged 3 commits into from
Nov 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ environment variables are **optional**._
| EVGA | `evga`|
| EVGA (EU) | `evga-eu`|
| Galaxus (DE) | `galaxus`|
| Game (UK) | `game`|
| Gamestop | `gamestop`|
| Mediamarkt (DE) | `mediamarkt`|
| MemoryExpress (CA) | `memoryexpress`|
Expand Down
14 changes: 14 additions & 0 deletions src/store/model/amazon-uk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ export const AmazonUk: Store = {
model: 'test:model',
series: 'test:series',
url: 'https://www.amazon.co.uk/dp/B081265T5Z/'
},
{
brand: 'sony',
cartUrl: 'https://www.amazon.com/gp/aws/cart/add.html?ASIN.1=B08FC5L3RG&Quantity.1=1',
model: 'ps5 console',
series: 'sonyps5c',
url: 'https://www.amazon.com/dp/B08FC5L3RG'
},
{
brand: 'sony',
cartUrl: 'https://www.amazon.com/gp/aws/cart/add.html?ASIN.1=B08H97NYGP&Quantity.1=1',
model: 'ps5 digital',
series: 'sonyps5de',
url: 'https://www.amazon.co.uk/dp/B08H97NYGP/'
}
],
linksBuilder: {
Expand Down
12 changes: 12 additions & 0 deletions src/store/model/ebuyer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ export const Ebuyer: Store = {
model: 'test:model',
series: 'test:series',
url: 'https://www.ebuyer.com/874209-gigabyte-geforce-rtx-2060-windforce-6gb-oc-graphics-card-gv-n2060wf2oc-6gd-v2'
},
{
brand: 'sony',
model: 'ps5 console',
series: 'sonyps5c',
url: 'https://www.ebuyer.com/1125329-sony-playstation-5-console-cfi-1015a'
},
{
brand: 'sony',
model: 'ps5 digital',
series: 'sonyps5de',
url: 'https://www.ebuyer.com/1125332-sony-playstation-5-digital-edition-cfi-1015b'
}
],
linksBuilder: {
Expand Down
39 changes: 39 additions & 0 deletions src/store/model/game.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import {Store} from './store';

export const Game: Store = {
labels: {
inStock: {
container: '.buyingOptions',
text: ['Pre-order Now', 'Buy New']
},
maxPrice: {
container: '.buyingOptions .btnPrice',
euroFormat: false
},
outOfStock: {
container: '.buyingOptions',
text: ['out of stock']
}
},
links: [
{
brand: 'test:brand',
model: 'test:model',
series: 'test:series',
url: 'https://www.game.co.uk/en/ea-sports-fifa-21-500gb-ps4-bundle-2832947'
},
{
brand: 'sony',
model: 'ps5 console',
series: 'sonyps5c',
url: 'https://www.game.co.uk/en/playstation-5-console-2826338'
},
{
brand: 'sony',
model: 'ps5 digital',
series: 'sonyps5de',
url: 'https://www.game.co.uk/en/playstation-5-digital-edition-2826341'
}
],
name: 'game'
};
2 changes: 2 additions & 0 deletions src/store/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {Ebuyer} from './ebuyer';
import {Evga} from './evga';
import {EvgaEu} from './evga-eu';
import {Galaxus} from './galaxus';
import {Game} from './game';
import {Gamestop} from './gamestop';
import {Mediamarkt} from './mediamarkt';
import {MemoryExpress} from './memoryexpress';
Expand Down Expand Up @@ -88,6 +89,7 @@ export const storeList = new Map([
[Evga.name, Evga],
[EvgaEu.name, EvgaEu],
[Galaxus.name, Galaxus],
[Game.name, Game],
[Gamestop.name, Gamestop],
[Mediamarkt.name, Mediamarkt],
[MemoryExpress.name, MemoryExpress],
Expand Down
12 changes: 12 additions & 0 deletions src/store/model/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ export const Scan: Store = {
model: 'test:model',
series: 'test:series',
url: 'https://www.scan.co.uk/products/msi-geforce-rtx-2060-ventus-xs-oc-6gb-gddr6-vr-ready-graphics-card-1920-core-1710mhz-boost'
},
{
brand: 'sony',
model: 'ps5 console',
series: 'sonyps5c',
url: 'https://www.scan.co.uk/products/playstation-5-console'
},
{
brand: 'sony',
model: 'ps5 digital',
series: 'sonyps5de',
url: 'https://www.scan.co.uk/products/playstation-5-digital-edition'
}
],
linksBuilder: {
Expand Down