From b242637ff6532384b5594a39dea0eb48229a0952 Mon Sep 17 00:00:00 2001 From: Jun Date: Mon, 5 Mar 2018 23:24:16 -0800 Subject: [PATCH] docs(readme): update readme and description --- README.md | 9 +++++++++ package.json | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 879e44a..5f13906 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,16 @@ This script can detect user's location based on IPs and returns Amazon geotargeted URLs. ## Usage +```javascript +const amazonGeotargetService = new AmazonGeotargetService(); +amazonGeotargetService.amazonGeotarget().then(res => console.log(res)); + +// To use it with a 'www.amazon.co.uk' as the default store +const amazonGeotargetService = new AmazonGeotargetService('www.amazon.co.uk'); +amazonGeotargetService.amazonGeotarget().then(res => console.log(res)); +``` +Refer to index.html for usage on a webpage. ## IP Sources IP service providers: diff --git a/package.json b/package.json index fa91085..b70ec9e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "amazonGeotarget", - "version": "0.0.0-development", - "description": "It is to locate the location of a user", + "name": "amazon-geotarget", + "version": "1.0.0", + "description": "It detects users' location and returns the right amazon store url.", "main": "src/index.js", "scripts": { "coverage": "nyc report --reporter=text-lcov | coveralls",