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(amd): add 5950 config #685

Merged
merged 8 commits into from
Nov 5, 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
3 changes: 2 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ const store = {
series: {
3070: envOrNumber(process.env.MAX_PRICE_SERIES_3070),
3080: envOrNumber(process.env.MAX_PRICE_SERIES_3080),
3090: envOrNumber(process.env.MAX_PRICE_SERIES_3090)
3090: envOrNumber(process.env.MAX_PRICE_SERIES_3090),
5950: envOrNumber(process.env.MAX_PRICE_SERIES_5950x)
}
},
microCenterLocation: envOrArray(process.env.MICROCENTER_LOCATION, ['web']),
Expand Down
14 changes: 14 additions & 0 deletions src/store/model/amazon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,20 @@ export const Amazon: Store = {
model: 'tuf oc',
series: '3090',
url: 'https://www.amazon.com/dp/B08HJLLF7G'
},
{
brand: 'amd',
cartUrl: 'https://www.amazon.com/gp/aws/cart/add.html?ASIN.1=B08164VTWH&Quantity.1=1',
model: '5900x',
series: 'ryzen5900',
url: 'https://www.amazon.com/dp/product/B08164VTWH'
},
{
brand: 'amd',
cartUrl: 'https://www.amazon.com/gp/aws/cart/add.html?ASIN.1=B0815Y8J9N&Quantity.1=1',
model: '5950x',
series: 'ryzen5950',
url: 'https://www.amazon.com/dp/product/B0815Y8J9N'
}
],
name: 'amazon'
Expand Down
51 changes: 51 additions & 0 deletions src/store/model/amd.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import {Store} from './store';

export const AMD: 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/5450881400/us'
},
{
brand: 'amd',
cartUrl: 'https://www.amd.com/en/direct-buy/5450881400/us?add-to-cart=true',
model: '5950x',
series: 'ryzen5950',
url: 'https://www.amd.com/en/direct-buy/5450881400/us'
},
{
brand: 'amd',
cartUrl: 'https://www.amd.com/en/direct-buy/5450881500/us?add-to-cart=true',
model: '5900x',
series: 'ryzen5900',
url: 'https://www.amd.com/en/direct-buy/5450881500/us'
},
{
brand: 'amd',
cartUrl: 'https://www.amd.com/en/direct-buy/5450881600/us?add-to-cart=true',
model: '5800x',
series: 'ryzen5800',
url: 'https://www.amd.com/en/direct-buy/5450881600/us'
},
{
brand: 'amd',
cartUrl: 'https://www.amd.com/en/direct-buy/5450881700/us?add-to-cart=true',
model: '5600x',
series: 'ryzen5600',
url: 'https://www.amd.com/en/direct-buy/5450881700/us'
}
],
name: 'amd'
};
24 changes: 24 additions & 0 deletions src/store/model/bandh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,30 @@ export const BAndH: Store = {
model: 'tuf oc',
series: '3090',
url: 'https://www.bhphotovideo.com/c/product/1594451-REG/asus_90yv0fd1_m0am00_tuf_gaming_geforce_rtx.html'
},
{
brand: 'amd',
model: '5950x',
series: 'ryzen5950',
url: 'https://www.bhphotovideo.com/c/product/1598372-REG/amd_100_100000059wof_ryzen_9_5950x_3_4.html'
},
{
brand: 'amd',
model: '5900x',
series: 'ryzen5900',
url: 'https://www.bhphotovideo.com/c/product/1598373-REG/amd_100_100000061wof_ryzen_9_5900x_3_7.html'
},
{
brand: 'amd',
model: '5800x',
series: 'ryzen5800',
url: 'https://www.bhphotovideo.com/c/product/1598376-REG/amd_100_100000063wof_ryzen_7_5800x_3_8.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'
}
],
name: 'bandh'
Expand Down
28 changes: 28 additions & 0 deletions src/store/model/bestbuy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,34 @@ export const BestBuy: Store = {
model: 'xlr8 rgb',
series: '3090',
url: 'https://www.bestbuy.com/site/pny-geforce-rtx-3090-24gb-xlr8-gaming-epic-x-rgb-triple-fan-graphics-card/6432657.p?skuId=6432657&intl=nosplash'
},
{
brand: 'amd',
cartUrl: 'https://api.bestbuy.com/click/-/6438942/cart',
njgreb marked this conversation as resolved.
Show resolved Hide resolved
model: '5900x',
series: 'ryzen5900',
url: 'https://www.bestbuy.com/site/amd-ryzen-9-5900x-4th-gen-12-core-24-threads-unlocked-desktop-processor-without-cooler/6438942.p?skuId=6438942&intl=nosplash'
njgreb marked this conversation as resolved.
Show resolved Hide resolved
},
{
brand: 'amd',
cartUrl: 'https://api.bestbuy.com/click/-/6438941/cart',
model: '5950x',
series: 'ryzen5950',
url: 'https://www.bestbuy.com/site/amd-ryzen-9-5950x-4th-gen-16-core-32-threads-unlocked-desktop-processor-without-cooler/6438941.p?skuId=6438941&intl=nosplash'
},
{
brand: 'amd',
cartUrl: 'https://api.bestbuy.com/click/-/6439000/cart',
model: '5800x',
series: 'ryzen5800',
url: 'https://www.bestbuy.com/site/amd-ryzen-7-5800x-4th-gen-8-core-16-threads-unlocked-desktop-processor-without-cooler/6439000.p?skuId=6439000&intl=nosplash'
},
{
brand: 'amd',
cartUrl: 'https://api.bestbuy.com/click/-/6438943/cart',
model: '5600x',
series: 'ryzen5600',
url: 'https://www.bestbuy.com/site/amd-ryzen-5-5600x-4th-gen-6-core-12-threads-unlocked-desktop-processor-with-wraith-stealth-cooler/6438943.p?skuId=6438943&intl=nosplash'
}
],
name: 'bestbuy'
Expand Down
2 changes: 2 additions & 0 deletions src/store/model/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {config, defaultStoreData} from '../../config';
import {AMD} from './amd';
import {Adorama} from './adorama';
import {Alternate} from './alternate';
import {AlternateNL} from './alternate-nl';
Expand Down Expand Up @@ -59,6 +60,7 @@ export const storeList = new Map([
[AmazonEs.name, AmazonEs],
[AmazonNl.name, AmazonNl],
[AmazonUk.name, AmazonUk],
[AMD.name, AMD],
[Aria.name, Aria],
[Asus.name, Asus],
[AsusDe.name, AsusDe],
Expand Down
32 changes: 32 additions & 0 deletions src/store/model/newegg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,38 @@ export const Newegg: Store = {
model: 'tuf oc',
series: '3070',
url: 'https://www.newegg.com/asus-geforce-rtx-3070-tuf-rtx3070-o8g-gaming/p/N82E16814126461'
},
{
brand: 'amd',
cartUrl: 'https://secure.newegg.com/Shopping/AddtoCart.aspx?Submit=ADD&ItemList=N82E16819113664',
itemNumber: '19-113-664',
model: '5900x',
series: 'ryzen5900',
url: 'https://www.newegg.com/amd-ryzen-9-5900x/p/N82E16819113664'
},
{
brand: 'amd',
cartUrl: 'https://secure.newegg.com/Shopping/AddtoCart.aspx?Submit=ADD&ItemList=N82E16819113663',
itemNumber: '19-113-663',
model: '5950x',
series: 'ryzen5950',
url: 'https://www.newegg.com/amd-ryzen-9-5950x/p/N82E16819113663'
},
{
brand: 'amd',
cartUrl: 'https://secure.newegg.com/Shopping/AddtoCart.aspx?Submit=ADD&ItemList=N82E16819113665',
itemNumber: '19-113-664',
model: '5800x',
series: 'ryzen5800',
url: 'https://www.newegg.com/amd-ryzen-9-5900x/p/N82E16819113665'
},
{
brand: 'amd',
cartUrl: 'https://secure.newegg.com/Shopping/AddtoCart.aspx?Submit=ADD&ItemList=N82E16819113666',
itemNumber: '19-113-663',
model: '5600x',
series: 'ryzen5600',
url: 'https://www.newegg.com/amd-ryzen-5-5600x/p/N82E16819113666'
}
],
name: 'newegg',
Expand Down
4 changes: 2 additions & 2 deletions src/store/model/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export type Pricing = {
euroFormat?: boolean;
};

export type Series = 'test:series' | '3070' | '3080' | '3090';
export type Series = 'test:series' | '3070' | '3080' | '3090' | 'ryzen5950' | 'ryzen5900' | 'ryzen5800' | 'ryzen5600';

export type Link = {
brand: 'test:brand' | 'asus' | 'evga' | 'gainward' | 'gigabyte' | 'inno3d' | 'kfa2' | 'msi' | 'nvidia' | 'palit' | 'pny' | 'zotac';
brand: 'test:brand' | 'amd' | 'asus' | 'evga' | 'gainward' | 'gigabyte' | 'inno3d' | 'kfa2' | 'msi' | 'nvidia' | 'palit' | 'pny' | 'zotac';
itemNumber?: string;
series: Series;
model: string;
Expand Down