Comparing version 1.0.3 to 1.0.4
@@ -21,10 +21,7 @@ 'use strict'; | ||
var hostname = 'developers.zomato.com'; | ||
var apiVersion = '/api/v2.1'; | ||
/** | ||
* Wrap the Zomato API | ||
*/ | ||
var Zomato = function () { | ||
var Zomato = function () { | ||
/** | ||
@@ -39,2 +36,4 @@ * constructor - Constructs the api object | ||
this.apiKey = apiKey; | ||
this.hostname = 'developers.zomato.com'; | ||
this.apiVersion = '/api/v2.1'; | ||
} | ||
@@ -54,3 +53,3 @@ | ||
value: function get(endpoint, querystring) { | ||
var path = apiVersion + '/' + endpoint; | ||
var path = this.apiVersion + '/' + endpoint; | ||
if (querystring !== undefined) { | ||
@@ -62,3 +61,3 @@ path += '?' + querystring; | ||
}; | ||
return _https2.default.get(hostname, path, headers); | ||
return _https2.default.get(this.hostname, path, headers); | ||
} | ||
@@ -65,0 +64,0 @@ |
{ | ||
"name": "zomato.js", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "zomato.js is a simple promise based JS wrapper for the Zomato API", | ||
@@ -29,2 +29,3 @@ "author": { | ||
"test": "mocha --compilers js:babel-register --timeout 10000", | ||
"coverage": "istanbul cover node_modules/.bin/_mocha -- --compilers js:babel-register --timeout 10000", | ||
"lint": "eslint ./src ./test --quiet", | ||
@@ -38,4 +39,4 @@ "clean": "rm -rf ./lib", | ||
"babel-cli": "^6.11.4", | ||
"babel-plugin-add-module-exports": "^0.2.1", | ||
"babel-preset-es2015": "^6.13.2", | ||
"babel-plugin-add-module-exports": "^0.2.1", | ||
"babel-register": "^6.11.6", | ||
@@ -45,2 +46,3 @@ "chai": "^3.5.0", | ||
"eslint": "^3.3.0", | ||
"istanbul": "^1.0.0-alpha.2", | ||
"mocha": "^3.0.2" | ||
@@ -47,0 +49,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123001
21
711
9