shopify-api-node
Advanced tools
Comparing version 2.5.0 to 2.6.0
@@ -115,3 +115,3 @@ 'use strict'; | ||
options.headers['Content-Type'] = 'application/json'; | ||
options.body = JSON.stringify(body); | ||
options.body = body; | ||
} | ||
@@ -118,0 +118,0 @@ |
{ | ||
"name": "shopify-api-node", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "Shopify API bindings for Node.js", | ||
@@ -18,3 +18,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"got": "^6.1.2", | ||
"got": "^7.0.0", | ||
"lodash": "^4.6.0", | ||
@@ -25,3 +25,3 @@ "qs": "^6.1.0", | ||
"devDependencies": { | ||
"chai": "^3.5.0", | ||
"chai": "^4.0.0", | ||
"eslint": "^3.0.1", | ||
@@ -28,0 +28,0 @@ "istanbul": "^0.4.2", |
@@ -176,5 +176,5 @@ # Shopify API Node.js (Official module) | ||
- collectionListing | ||
- `get(applicationId, id)` | ||
- `list(applicationId[, params])` | ||
- `productIds(applicationId, id)` | ||
- `get(id)` | ||
- `list([params])` | ||
- `productIds(id)` | ||
- comment | ||
@@ -237,2 +237,9 @@ - `approve(id)` | ||
- `list([params])` | ||
- discountCode | ||
- `create(priceRuleId, params)` | ||
- `delete(priceRuleId, id)` | ||
- `get(priceRuleId, id)` | ||
- `list(priceRuleId)` | ||
- `lookup(params)` | ||
- `update(priceRuleId, id, params)` | ||
- draftOrder | ||
@@ -328,2 +335,8 @@ - `complete(id[, params])` | ||
- `list([params])` | ||
- priceRule | ||
- `create(params)` | ||
- `delete(id)` | ||
- `get(id)` | ||
- `list([params])` | ||
- `update(id, params)` | ||
- product | ||
@@ -344,6 +357,6 @@ - `count([params])` | ||
- productListing | ||
- `count(applicationId)` | ||
- `get(applicationId, id)` | ||
- `list(applicationId[, params])` | ||
- `productIds(applicationId[, params])` | ||
- `count()` | ||
- `get(id)` | ||
- `list([params])` | ||
- `productIds([params])` | ||
- productVariant | ||
@@ -350,0 +363,0 @@ - `count(productId)` |
@@ -6,3 +6,3 @@ 'use strict'; | ||
const baseChild = require('../mixins/base-child'); | ||
const base = require('../mixins/base'); | ||
@@ -19,3 +19,2 @@ /** | ||
this.parentName = 'applications'; | ||
this.name = 'collection_listings'; | ||
@@ -25,3 +24,3 @@ this.key = 'collection_listing'; | ||
assign(CollectionListing.prototype, pick(baseChild, [ | ||
assign(CollectionListing.prototype, pick(base, [ | ||
'get', | ||
@@ -35,3 +34,2 @@ 'list', | ||
* | ||
* @param {Number} parentId Application ID | ||
* @param {Number} id Collection ID | ||
@@ -41,4 +39,4 @@ * @return {Promise} Promise that resolves with the result | ||
*/ | ||
CollectionListing.prototype.productIds = function productIds(parentId, id) { | ||
const url = this.buildUrl(parentId, `${id}/product_ids`); | ||
CollectionListing.prototype.productIds = function productIds(id) { | ||
const url = this.buildUrl(`${id}/product_ids`); | ||
return this.shopify.request(url, 'GET', 'product_ids'); | ||
@@ -45,0 +43,0 @@ }; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
const baseChild = require('../mixins/base-child'); | ||
const base = require('../mixins/base'); | ||
@@ -19,3 +19,2 @@ /** | ||
this.parentName = 'applications'; | ||
this.name = 'product_listings'; | ||
@@ -25,3 +24,3 @@ this.key = 'product_listing'; | ||
assign(ProductListing.prototype, omit(baseChild, [ | ||
assign(ProductListing.prototype, omit(base, [ | ||
'create', | ||
@@ -35,9 +34,9 @@ 'delete', | ||
* | ||
* @param {Number} parentId Application ID | ||
* @param {Object} [params] Query parameters | ||
* @return {Promise} Promise that resolves with the result | ||
* @public | ||
*/ | ||
ProductListing.prototype.productIds = function productIds(parentId, params) { | ||
ProductListing.prototype.productIds = function productIds(params) { | ||
const key = 'product_ids'; | ||
const url = this.buildUrl(parentId, key, params); | ||
const url = this.buildUrl(key, params); | ||
return this.shopify.request(url, 'GET', key); | ||
@@ -44,0 +43,0 @@ }; |
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
69720
58
1924
497
+ Addeddecompress-response@3.3.0(transitive)
+ Addedgot@7.1.0(transitive)
+ Addedhas-symbol-support-x@1.4.2(transitive)
+ Addedhas-to-string-tag-x@1.4.1(transitive)
+ Addedis-object@1.0.2(transitive)
+ Addedis-plain-obj@1.1.0(transitive)
+ Addedisurl@1.0.0(transitive)
+ Addedmimic-response@1.0.1(transitive)
+ Addedp-cancelable@0.3.0(transitive)
+ Addedp-finally@1.0.0(transitive)
+ Addedp-timeout@1.2.1(transitive)
+ Addedurl-to-options@1.0.1(transitive)
- Removedcapture-stack-trace@1.0.2(transitive)
- Removedcreate-error-class@3.0.2(transitive)
- Removedgot@6.7.1(transitive)
- Removedis-redirect@1.0.0(transitive)
- Removedunzip-response@2.0.1(transitive)
Updatedgot@^7.0.0