From f6760d3c65d60eae9e4b1e0fdba34e814f446a4c Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Fri, 25 Sep 2020 19:37:43 -0400 Subject: [PATCH] feat(store): add `pny` (#295) --- README.md | 11 ++++---- src/store/model/index.ts | 2 ++ src/store/model/pny.ts | 56 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 5 deletions(-) create mode 100644 src/store/model/pny.ts diff --git a/README.md b/README.md index 055ed7b..4343cc5 100644 --- a/README.md +++ b/README.md @@ -30,11 +30,11 @@ The purpose of this bot is to get an Nvidia card. It tries multiple things to do > :point_right: You may get false positives from time to time, so I apologize for that. The library currently waits for all calls to be completed before parsing, but sometimes this can have unknown behavior. Patience is a virtue :) -| | **Adorama** | **Amazon** | **Amazon (CA)** | **ASUS** | **B&H** | **Best Buy** | **Best Buy (CA)** | **EVGA** | **Micro Center** | **Newegg** | **Newegg (CA)** | **Nvidia** | **Office Depot** | **Zotac** | -|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| -| **3070**| | | | | | | | | | | | | | | -| **3080** | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | -| **3090** | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | | `✔` | `✔` | `✔` | | `✔` | +| | **Adorama** | **Amazon** | **Amazon (CA)** | **ASUS** | **B&H** | **Best Buy** | **Best Buy (CA)** | **EVGA** | **Micro Center** | **Newegg** | **Newegg (CA)** | **Nvidia** | **Office Depot** | **PNY** | **Zotac** | +|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:| +| **3070**| | | | | | | | | | | | | | `✔` | | +| **3080** | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | +| **3090** | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | `✔` | | `✔` | `✔` | `✔` | | `✔` | `✔` | ## Installation and prerequisites @@ -136,6 +136,7 @@ Here is a list of variables that you can use to customize your newly copied `.en | Nvidia | `nvidia`| | Nvidia (API) | `nvidia-api`| | Office Depot | `officedepot`| +| PNY | `pny`| | Zotac | `zotac`|
diff --git a/src/store/model/index.ts b/src/store/model/index.ts index 7d059ec..83f6da0 100644 --- a/src/store/model/index.ts +++ b/src/store/model/index.ts @@ -17,6 +17,7 @@ import {NeweggCa} from './newegg-ca'; import {Nvidia} from './nvidia'; import {NvidiaApi} from './nvidia-api'; import {OfficeDepot} from './officedepot'; +import {Pny} from './pny'; import {Store} from './store'; import {Zotac} from './zotac'; @@ -38,6 +39,7 @@ const masterList = new Map([ [Nvidia.name, Nvidia], [NvidiaApi.name, NvidiaApi], [OfficeDepot.name, OfficeDepot], + [Pny.name, Pny], [Zotac.name, Zotac] ]); diff --git a/src/store/model/pny.ts b/src/store/model/pny.ts new file mode 100644 index 0000000..96b5937 --- /dev/null +++ b/src/store/model/pny.ts @@ -0,0 +1,56 @@ +import {Store} from './store'; + +export const Pny: Store = { + labels: { + inStock: { + container: '#ctl01_lbtnAddToCart', + text: ['add to cart'] + } + }, + links: [ + { + brand: 'test:brand', + model: 'test:model', + series: 'test:series', + url: 'https://www.pny.com/pny-geforce-gtx-1660-super-gaming-oc-sf' + }, + { + brand: 'pny', + model: 'dual fan', + series: '3070', + url: 'https://www.pny.com/pny-geforce-rtx-3070-8gb-df' + }, + { + brand: 'pny', + model: 'xlr8 rgb', + series: '3070', + url: 'https://www.pny.com/geforce-rtx-3070-xlr8-gaming-epic-x-rgb-triple-fan' + }, + { + brand: 'pny', + model: 'xlr8 rgb', + series: '3080', + url: 'https://www.pny.com/geforce-rtx-3080-xlr8-gaming-epic-x-rgb-triple-fan-m' + }, + { + brand: 'pny', + model: 'xlr8 rgb', + series: '3080', + url: 'https://www.pny.com/geforce-rtx-3080-xlr8-gaming-epic-x-rgb-triple-fan-p' + }, + { + brand: 'pny', + model: 'xlr8 rgb', + series: '3090', + url: 'https://www.pny.com/geforce-rtx-3090-xlr8-gaming-epic-x-rgb-triple-fan-m' + }, + { + brand: 'pny', + model: 'xlr8 rgb', + series: '3090', + url: 'https://www.pny.com/geforce-rtx-3090-xlr8-gaming-epic-x-rgb-triple-fan-p' + } + ], + name: 'pny' +}; +