README
ubiquitous-winner
Installation
install globally using npm so that it may be run from the command line.
npm install -g @simonjayhawkins/ubiquitous-winner
Configuration
create mwsconfig.json in your home directory for Amazon Marketplace credentials
{
"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 config.json in the working directory
{
"GetMatchingProductForId": {
"dataService": {
"default": "localFileSystem",
"services": [
{
"name": "localFileSystem",
"module": "data-service-local-fs",
"eventSourceFilePrefix": "item-attributes/item-attributes",
"eventSourceFileExt": "log",
"snapshotFilePrefix": "item-attributes.snapshot",
"snapshotFileExt": "txt"
}
]
}
}
}
If using AWS create a credentials file at ~/.aws/credentials on Mac/Linux or C:\Users\USERNAME\.aws\credentials on Windows
[default]
aws_access_key_id = your_access_key
aws_secret_access_key = your_secret_key
Usage
Usage: getproductdata [options] [file]
A command-line tool to fetch ASIN item attributes using Amazon Marketplace Web Services API
Options:
-h, --help output usage information
-V, --version output the version number
-v, --verbose additional output
-a, --all process all ASIN in <file>
-c, --config <path> set dataservice config path. defaults to config.json
-m, --mws-credentials <path> set MWS credentials path. defaults to /home/user/mwsconfig.json