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 johnlewis store, add shopto store #1481

Merged
merged 5 commits into from
Dec 20, 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
2 changes: 2 additions & 0 deletions docs/reference/filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Used with the `STORES` variable.
| Gamestop | DE | `gamestop-de`|
| Gamestop | IE | `gamestop-ie`|
| Harvey Normans | IE | | `harveynorman-ie` |
| John Lewis | UK | `johnlewis`|
| Kabum | BR | `kabum`|
| Mediamarkt | DE | `mediamarkt`|
| Medimax | DE | `medimax`|
Expand All @@ -117,6 +118,7 @@ Used with the `STORES` variable.
| Saturn | DE | `saturn`|
| Scan | UK | `scan`|
| Scorptec | AU | `scorptec`|
| ShopTo | UK | `shopto`|
| Smyths Toys | UK | `smythstoys`|
| Smyths Toys | IE | `smythstoys-ie`|
| Spielegrotte | DE | `spielegrotte`|
Expand Down
4 changes: 4 additions & 0 deletions src/store/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import {Gamestop} from './gamestop';
import {GamestopDE} from './gamestop-de';
import {GamestopIE} from './gamestop-ie';
import {HarveyNormanIE} from './harveynorman-ie';
import {JohnLewis} from './johnlewis';
import {Kabum} from './kabum';
import {Mediamarkt} from './mediamarkt';
import {Medimax} from './medimax';
Expand All @@ -83,6 +84,7 @@ import {ProshopDK} from './proshop-dk';
import {Saturn} from './saturn';
import {Scan} from './scan';
import {Scorptec} from './scorptec';
import {ShopTo} from './shopto';
import {SmythsToys} from './smythstoys';
import {SmythsToysIE} from './smythstoys-ie';
import {Spielegrotte} from './spielegrotte';
Expand Down Expand Up @@ -161,6 +163,7 @@ export const storeList = new Map([
[GamestopDE.name, GamestopDE],
[GamestopIE.name, GamestopIE],
[HarveyNormanIE.name, HarveyNormanIE],
[JohnLewis.name, JohnLewis],
[Kabum.name, Kabum],
[Mediamarkt.name, Mediamarkt],
[Medimax.name, Medimax],
Expand All @@ -187,6 +190,7 @@ export const storeList = new Map([
[Saturn.name, Saturn],
[Scan.name, Scan],
[Scorptec.name, Scorptec],
[ShopTo.name, ShopTo],
[SmythsToysIE.name, SmythsToysIE],
[SmythsToys.name, SmythsToys],
[Spielegrotte.name, Spielegrotte],
Expand Down
28 changes: 28 additions & 0 deletions src/store/model/johnlewis.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import {Store} from './store';

export const JohnLewis: Store = {
currency: '£',
labels: {
inStock: {
container: '#button--add-to-basket',
text: ['Add to your basket']
}
},
links: [
{
brand: 'test:brand',
model: 'test:model',
series: 'test:series',
url:
'https://www.johnlewis.com/sony-playstation-5-dualsense-wireless-controller-white/p5192093'
},
{
brand: 'sony',
model: 'ps5 console',
series: 'sonyps5c',
url:
'https://www.johnlewis.com/sony-playstation-5-console-with-dualsense-controller/white/p5115192'
}
],
name: 'johnlewis'
};
35 changes: 35 additions & 0 deletions src/store/model/shopto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import {Store} from './store';

export const ShopTo: Store = {
currency: '£',
labels: {
inStock: {
container: '.orderbox_inventory',
text: ['In Stock']
}
},
links: [
{
brand: 'test:brand',
model: 'test:model',
series: 'test:series',
url:
'https://www.shopto.net/en/ps5du00-dualsense-controller-playstation-5-p195100/'
},
{
brand: 'sony',
model: 'ps5 console',
series: 'sonyps5c',
url:
'https://www.shopto.net/en/ps5hw01-playstation-5-console-p191472/'
},
{
brand: 'sony',
model: 'ps5 digital',
series: 'sonyps5de',
url:
'https://www.shopto.net/en/ps5hw02-playstation-5-digital-console-p195341/'
}
],
name: 'shopto'
};