directus-sdk-javascript
Advanced tools
Comparing version 2.2.0-1 to 2.2.0
{ | ||
"name": "directus-sdk-javascript", | ||
"version": "2.2.0-1", | ||
"version": "2.2.0", | ||
"description": "WIP - Directus SDK for JavaScript (Node and Browser)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -100,4 +100,4 @@ const axios = require('axios'); | ||
getItem(table = requiredParam('table'), id = requiredParam('id')) { | ||
return this._get(`tables/${table}/rows/${id}`); | ||
getItem(table = requiredParam('table'), id = requiredParam('id'), params = {}) { | ||
return this._get(`tables/${table}/rows/${id}`, params); | ||
} | ||
@@ -113,29 +113,2 @@ | ||
createBulk(table = requiredParam('table'), data = requiredParam('data')) { | ||
if (Array.isArray(data) === false) | ||
throw new Error(`Parameter data should be an array of objects`); | ||
return this._post(`tables/${table}/rows/bulk`, { | ||
rows: data | ||
}); | ||
} | ||
updateBulk(table = requiredParam('table'), data = requiredParam('data')) { | ||
if (Array.isArray(data) === false) | ||
throw new Error(`Parameter data should be an array of objects`); | ||
return this._put(`tables/${table}/rows/bulk`, { | ||
rows: data | ||
}); | ||
} | ||
deleteBulk(table = requiredParam('table'), data = requiredParam('data')) { | ||
if (Array.isArray(data) === false) | ||
throw new Error(`Parameter data should be an array of objects`); | ||
return this._delete(`tables/${table}/rows/bulk`, { | ||
rows: data | ||
}); | ||
} | ||
// Files | ||
@@ -142,0 +115,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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
44412
228