From a79ce6f40643ad45dd301232770aa0ade7afb040 Mon Sep 17 00:00:00 2001 From: Yuheng Ouyang Date: Sat, 28 Nov 2020 18:55:25 -0800 Subject: [PATCH] chore(store): add amd (ca) (#1006) --- README.md | 1 + src/store/model/amd-ca.ts | 39 +++++++++++++++++++++++++++++++++++++++ src/store/model/index.ts | 2 ++ 3 files changed, 42 insertions(+) create mode 100644 src/store/model/amd-ca.ts diff --git a/README.md b/README.md index 3531b2a..1b47f04 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,7 @@ environment variables are **optional**._ | Amazon (NL) | `amazon-nl`| | Amazon (UK) | `amazon-uk`| | AMD | `amd`| +| AMD (CA) | `amd-ca`| | AMD (DE) | `amd-de`| | AMD (IT) | `amd-it`| | Aria PC (UK) | `aria`| diff --git a/src/store/model/amd-ca.ts b/src/store/model/amd-ca.ts new file mode 100644 index 0000000..62c06d0 --- /dev/null +++ b/src/store/model/amd-ca.ts @@ -0,0 +1,39 @@ +import {Store} from './store'; + +export const AmdCa: Store = { + labels: { + inStock: { + container: '.btn-shopping-cart', + text: ['add to cart'] + }, + maxPrice: { + container: '.product-page-description h4', + euroFormat: false + } + }, + links: [ + { + brand: 'test:brand', + model: 'test:model', + series: 'test:series', + url: 'https://www.amd.com/en/direct-buy/5458373400/ca' + }, + { + brand: 'amd', + cartUrl: + 'https://www.amd.com/en/direct-buy/5458373400/ca?add-to-cart=true', + model: 'amd reference', + series: 'rx6800', + url: 'https://www.amd.com/en/direct-buy/5458373400/ca' + }, + { + brand: 'amd', + cartUrl: + 'https://www.amd.com/en/direct-buy/5458372800/ca?add-to-cart=true', + model: 'amd reference', + series: 'rx6800xt', + url: 'https://www.amd.com/en/direct-buy/5458372800/ca' + } + ], + name: 'amd-ca' +}; diff --git a/src/store/model/index.ts b/src/store/model/index.ts index 5aa19b9..80c0d94 100644 --- a/src/store/model/index.ts +++ b/src/store/model/index.ts @@ -11,6 +11,7 @@ import {AmazonIt} from './amazon-it'; import {AmazonNl} from './amazon-nl'; import {AmazonUk} from './amazon-uk'; import {Amd} from './amd'; +import {AmdCa} from './amd-ca'; import {AmdDe} from './amd-de'; import {AmdIt} from './amd-it'; import {Aria} from './aria'; @@ -83,6 +84,7 @@ export const storeList = new Map([ [AmazonUk.name, AmazonUk], [AmazonIt.name, AmazonIt], [Amd.name, Amd], + [AmdCa.name, AmdCa], [AmdDe.name, AmdDe], [AmdIt.name, AmdIt], [Aria.name, Aria],