/ikea-availability-checker

ikea product in-store availability checker

Primary LanguageJavaScriptMIT LicenseMIT

Sometimes there is a high demand on products which then are unavailable in the IKEA online store and even in the locations. So here’s a script which makes it easy to check the availability of a list of products and locations.

MIT License NPM Package NPM Downloads CircleCI Known Vulnerabilities

Installation

npm install ikea-availability-checker

Usage Examples

The default reports prints the results as a human readable table.

List stores in specific countries

npm run start -- stores at

┌─────────────┬─────────┬────────┬────────────────┐
│ countryCode │ country │ buCode │ name           │
├─────────────┼─────────┼────────┼────────────────┤
│ at          │ Austria │ 085    │ Wien Vösendorf │
├─────────────┼─────────┼────────┼────────────────┤
│ at          │ Austria │ 090    │ Wien Nord      │
├─────────────┼─────────┼────────┼────────────────┤
│ at          │ Austria │ 155    │ Klagenfurt     │
├─────────────┼─────────┼────────┼────────────────┤
│ at          │ Austria │ 273    │ Innsbruck      │
├─────────────┼─────────┼────────┼────────────────┤
│ at          │ Austria │ 386    │ Salzburg       │
├─────────────┼─────────┼────────┼────────────────┤
│ at          │ Austria │ 387    │ Graz           │
├─────────────┼─────────┼────────┼────────────────┤
│ at          │ Austria │ 388    │ Haid           │
└─────────────┴─────────┴────────┴────────────────┘

Product Avaialability in a country

npm run start -- stock --country at S69022537

┌──────────────────────────┬─────────────┬─────────┬───────────┬──────────────────┬────────────────┬───────┬─────────────┐
│ date                     │ countryCode │ country │ product   │ storeId (buCode) │ store          │ stock │ probability │
├──────────────────────────┼─────────────┼─────────┼───────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ 2020-02-14T10:02:16.036Z │ at          │ Austria │ S69022537 │ 387              │ Graz           │     8 │        HIGH │
├──────────────────────────┼─────────────┼─────────┼───────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ 2020-02-14T10:02:15.986Z │ at          │ Austria │ S69022537 │ 388              │ Haid           │    16 │        HIGH │
├──────────────────────────┼─────────────┼─────────┼───────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ 2020-02-14T10:02:16.081Z │ at          │ Austria │ S69022537 │ 273              │ Innsbruck      │    12 │        HIGH │
├──────────────────────────┼─────────────┼─────────┼───────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ 2020-02-14T10:02:15.988Z │ at          │ Austria │ S69022537 │ 155              │ Klagenfurt     │    13 │        HIGH │
├──────────────────────────┼─────────────┼─────────┼───────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ 2020-02-14T10:02:16.092Z │ at          │ Austria │ S69022537 │ 386              │ Salzburg       │    18 │        HIGH │
├──────────────────────────┼─────────────┼─────────┼───────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ 2020-02-14T10:02:16.092Z │ at          │ Austria │ S69022537 │ 090              │ Wien Nord      │    12 │        HIGH │
├──────────────────────────┼─────────────┼─────────┼───────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ 2020-02-14T10:02:16.095Z │ at          │ Austria │ S69022537 │ 085              │ Wien Vösendorf │    23 │        HIGH │
└──────────────────────────┴─────────────┴─────────┴───────────┴──────────────────┴────────────────┴───────┴─────────────┘

Specific product, store & country

npm run start -- stock --store=155 --country=at S69022537

┌─────────────┬─────────┬───────────┬──────────────────┬────────────┬───────┬─────────────┐
│ countryCode │ country │ product   │ storeId (buCode) │ store      │ stock │ probability │
├─────────────┼─────────┼───────────┼──────────────────┼────────────┼───────┼─────────────┤
│ at          │ Austria │ S69022537 │ 155              │ Klagenfurt │    10 │        HIGH │
└─────────────┴─────────┴───────────┴──────────────────┴────────────┴───────┴─────────────┘

The "store" option also accepts strings which match on the location’s name:

npm run start -- stock --store=Berlin 40413131

Multiple products & stores

npm run start -- stock --country=de --store=224,069,063 S69022537 40313075 40299687

┌─────────────┬─────────┬──────────┬──────────────────┬────────────────┬───────┬─────────────┐
│ countryCode │ country │ product  │ storeId (buCode) │ store          │ stock │ probability │
├─────────────┼─────────┼──────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ de          │ Germany │ 40313075 │ 063              │ München-Eching │     9 │        HIGH │
├─────────────┼─────────┼──────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ de          │ Germany │ 40313075 │ 069              │ Oldenburg      │     6 │        HIGH │
├─────────────┼─────────┼──────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ de          │ Germany │ 40313075 │ 224              │ Sindelfingen   │    10 │        HIGH │
└─────────────┴─────────┴──────────┴──────────────────┴────────────────┴───────┴─────────────┘
┌─────────────┬─────────┬──────────┬──────────────────┬────────────────┬───────┬─────────────┐
│ countryCode │ country │ product  │ storeId (buCode) │ store          │ stock │ probability │
├─────────────┼─────────┼──────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ de          │ Germany │ 40299687 │ 063              │ München-Eching │     9 │        HIGH │
├─────────────┼─────────┼──────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ de          │ Germany │ 40299687 │ 069              │ Oldenburg      │    32 │        HIGH │
├─────────────┼─────────┼──────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ de          │ Germany │ 40299687 │ 224              │ Sindelfingen   │    39 │        HIGH │
└─────────────┴─────────┴──────────┴──────────────────┴────────────────┴───────┴─────────────┘
┌─────────────┬─────────┬───────────┬──────────────────┬────────────────┬───────┬─────────────┐
│ countryCode │ country │ product   │ storeId (buCode) │ store          │ stock │ probability │
├─────────────┼─────────┼───────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ de          │ Germany │ S69022537 │ 063              │ München-Eching │    19 │        HIGH │
├─────────────┼─────────┼───────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ de          │ Germany │ S69022537 │ 069              │ Oldenburg      │     9 │        HIGH │
├─────────────┼─────────┼───────────┼──────────────────┼────────────────┼───────┼─────────────┤
│ de          │ Germany │ S69022537 │ 224              │ Sindelfingen   │     9 │        HIGH │
└─────────────┴─────────┴───────────┴──────────────────┴────────────────┴───────┴─────────────┘

Other Projects & Articles

Development

Requirements

  • nodejs for version info check .nvmrc. it is strongly recommended to use either nvm and the exact same node version or the docker container as development environment

Debugging

DEBUG=ikea* npm run start

Testing

The project has a preconfigured test runner moch.

Run Tests

Running all tests will also create coverage reports shown after the test results.

npm run test

TDD

npm run tdd

Run Specific tests

run test -- --grep="stock reporter"