Skip to content

Commit

Permalink
feat(store): add corsair sfx PSUs (#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismendoza committed Nov 22, 2020
1 parent 292e360 commit e552c91
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/config.ts
Expand Up @@ -316,6 +316,7 @@ const store = {
ryzen5800: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN5800),
ryzen5900: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN5900),
ryzen5950: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN5950),
sf: envOrNumber(process.env.MAX_PRICE_SERIES_CORSAIR_SF),
sonyps5c: -1,
sonyps5de: -1,
'test:series': -1,
Expand Down
16 changes: 16 additions & 0 deletions src/store/model/amazon.ts
Expand Up @@ -491,6 +491,22 @@ export const Amazon: Store = {
model: 'xbox series s',
series: 'xboxss',
url: 'https://www.amazon.com/dp/B08G9J44ZN'
},
{
brand: 'corsair',
cartUrl:
'https://www.amazon.com/gp/aws/cart/add.html?ASIN.1=B07M63H81H&Quantity.1=1',
model: '750 platinum',
series: 'sf',
url: 'https://www.amazon.com/dp/B07M63H81H'
},
{
brand: 'corsair',
cartUrl:
'https://www.amazon.com/gp/aws/cart/add.html?ASIN.1=B07F84FJ1G&Quantity.1=1',
model: '600 platinum',
series: 'sf',
url: 'https://www.amazon.com/dp/B07F84FJ1G'
}
],
name: 'amazon'
Expand Down
14 changes: 14 additions & 0 deletions src/store/model/bandh.ts
Expand Up @@ -187,6 +187,20 @@ export const BAndH: Store = {
series: 'ryzen5600',
url:
'https://www.bhphotovideo.com/c/product/1598377-REG/amd_100_100000065box_ryzen_5_5600x_3_7.html'
},
{
brand: 'amd',
model: '5600x',
series: 'ryzen5600',
url:
'https://www.bhphotovideo.com/c/product/1598377-REG/amd_100_100000065box_ryzen_5_5600x_3_7.html'
},
{
brand: 'corsair',
model: '750 platinum',
series: 'sf',
url:
'https://www.bhphotovideo.com/c/product/1560680-REG/corsair_cp_9020186_na_corsair_sf750_power_supply.html'
}
],
name: 'bandh'
Expand Down
16 changes: 16 additions & 0 deletions src/store/model/bestbuy.ts
Expand Up @@ -405,6 +405,22 @@ export const BestBuy: Store = {
series: 'rx6800xt',
url:
'https://www.bestbuy.com/site/xfx-amd-radeon-rx-6800xt-16gb-gddr6-pci-express-4-0-gaming-graphics-card-black/6441226.p?skuId=6441226'
},
{
brand: 'corsair',
cartUrl: 'https://api.bestbuy.com/click/-/6351845/cart',
model: '750 platinum',
series: 'sf',
url:
'https://www.bestbuy.com/site/corsair-sf-series-750w-atx12v-2-4-eps12v-2-92-sfx12v-80-plus-platinum-modular-power-supply-black/6351845.p?skuId=6351845'
},
{
brand: 'corsair',
cartUrl: 'https://api.bestbuy.com/click/-/6351844/cart',
model: '600 platinum',
series: 'sf',
url:
'https://www.bestbuy.com/site/corsair-sf-series-600w-atx12v-2-4-eps12v-2-92-sfx12v-80-plus-platinum-modular-power-supply-black/6351844.p?skuId=6351844'
}
],
name: 'bestbuy'
Expand Down
38 changes: 38 additions & 0 deletions src/store/model/corsair.ts
@@ -0,0 +1,38 @@
import {Store} from './store';

export const Corsair: Store = {
labels: {
inStock: {
container: '.add_to_cart_form',
text: ['add to cart']
},
maxPrice: {
container: '.product-price',
euroFormat: false
}
},
links: [
{
brand: 'test:brand',
model: 'test:model',
series: 'test:series',
url:
'https://www.corsair.com/us/en/Categories/Products/Power-Supply-Units/Power-Supply-Units-Advanced/SF-Series/p/CP-9020181-NA'
},
{
brand: 'corsair',
model: '750 platinum',
series: 'sf',
url:
'https://www.corsair.com/us/en/Categories/Products/Power-Supply-Units/Power-Supply-Units-Advanced/SF-Series/p/CP-9020186-NA'
},
{
brand: 'corsair',
model: '600 platinum',
series: 'sf',
url:
'https://www.corsair.com/us/en/Categories/Products/Power-Supply-Units/Power-Supply-Units-Advanced/SF-Series/p/CP-9020182-NA'
}
],
name: 'corsair'
};
2 changes: 2 additions & 0 deletions src/store/model/index.ts
Expand Up @@ -26,6 +26,7 @@ import {Ccl} from './ccl';
import {Computeruniverse} from './computeruniverse';
import {Coolblue} from './coolblue';
import {Coolmod} from './coolmod';
import {Corsair} from './corsair';
import {Currys} from './currys';
import {Cyberport} from './cyberport';
import {Ebuyer} from './ebuyer';
Expand Down Expand Up @@ -92,6 +93,7 @@ export const storeList = new Map([
[Computeruniverse.name, Computeruniverse],
[Coolblue.name, Coolblue],
[Coolmod.name, Coolmod],
[Corsair.name, Corsair],
[Currys.name, Currys],
[Cyberport.name, Cyberport],
[Ebuyer.name, Ebuyer],
Expand Down
4 changes: 4 additions & 0 deletions src/store/model/store.ts
Expand Up @@ -15,6 +15,7 @@ export type Brand =
| 'amd'
| 'asrock'
| 'asus'
| 'corsair'
| 'evga'
| 'gainward'
| 'gigabyte'
Expand Down Expand Up @@ -45,6 +46,7 @@ export type Series =
| 'ryzen5950'
| 'sonyps5c'
| 'sonyps5de'
| 'sf'
| 'xboxsx'
| 'xboxss';

Expand All @@ -54,6 +56,8 @@ export type Model =
| '5800x'
| '5900x'
| '5950x'
| '600 platinum'
| '750 platinum'
| 'amd reference'
| 'amp extreme holo'
| 'amp holo'
Expand Down

0 comments on commit e552c91

Please sign in to comment.