Skip to content

Commit

Permalink
feat(store): add johnlewis store, add shopto store (#1481)
Browse files Browse the repository at this point in the history
* add `johnlewis` store

* feat: add `shopto` store

* chore: linting

* chore: linting

Co-authored-by: Jef LeCompte <jeffreylec@gmail.com>
  • Loading branch information
J-Hinton and jef committed Dec 20, 2020
1 parent 7a5bc22 commit ec8d357
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/reference/filter.md
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
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
@@ -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
@@ -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'
};

0 comments on commit ec8d357

Please sign in to comment.