match-products

A command-line tool to match product barcodes to ASIN using Amazon Marketplace Web Services API


License
MIT
Install
npm install match-products@1.0.0-alpha.3

Documentation

match-products

npm version JavaScript Style Guide

Installation

install globally using npm so that it may be run from the command line.

npm install -g match-products

Configuration

create mwsconfig.json in your home directory

{
  "merchantId": "<Your Merchant Id>",
  "accessKeyId": "<Your AWS Access Key ID>",
  "secretAccessKey": "<Your AWS Secret Key>",
  "endpoint": "<Your Marketplace Endpoint>",
  "marketplaceId": "<Your Default Marketplace Id>",
  "dataService": {
    "default": "localFileSystem",
    "services": {
      "localFileSystem": {
        "path": "mws-requests",
        "format": "json"
      },
      "s3": {
        "bucketName": "<myBucket>",
        "bucketRegion": "<myRegion>",
        "objectPrefix": "mws-requests",
        "objectStorageClass": "STANDARD | REDUCED_REDUNDANCY | STANDARD_IA"
      }
    }
  }
}

create mpconfig.json in the working directory

{
  "dataService": {
    "default": "localFileSystem",
    "services": [
      {
        "name": "localFileSystem",
        "module": "data-service-local-fs",
        "eventSourceFilePrefix": "matchresults/matchresults",
        "eventSourceFileExt": "log",
        "snapshotFilePrefix": "matchresults.snapshot",
        "snapshotFileExt": "txt"
      }
    ]
  }
}

Usage

  Usage: matchproducts [options] [file]

  A command-line tool to match product barcodes to ASIN using Amazon Marketplace Web Services API

  Options:

    -h, --help     output usage information
    -V, --version  output the version number
    -v, --verbose  additional output
    -c, --check    validate barcode check digits and exit
    -d, --dataservice-config <path>  set dataservice config path. defaults to mpconfig.json
    -m, --mws-credentials <path>     set MWS credentials path. defaults to /home/user/mwsconfig.json