sprucebot-node
Advanced tools
Comparing version 1.1.0 to 1.1.1
34
index.js
@@ -102,3 +102,3 @@ const Https = require('./https') | ||
* @param {String} userId | ||
* @param {Object} Optional query stirng to be added to the request | ||
* @param {Object} Optional query string to be added to the request | ||
*/ | ||
@@ -110,2 +110,34 @@ async globalUser(userId, query) { | ||
/** | ||
* Get all locations. GLOBAL SKILLS ONLY | ||
* | ||
* @param {Object} Optional query string to be added to the request | ||
*/ | ||
async globalLocations(query) { | ||
return this.https.get(`/ge/locations`, query) | ||
} | ||
/** | ||
* Create a user | ||
* | ||
* @param {Object} values | ||
* @returns {Promise} | ||
*/ | ||
async createUser(values) { | ||
return this.https.post('/ge/users', values) | ||
} | ||
/** | ||
* Update a users role | ||
* | ||
* @param {String} locationId | ||
* @param {String} userId | ||
* @param {String} role | ||
* @returns {Promise} | ||
*/ | ||
async updateRole(locationId, userId, role) { | ||
return this.https.patch( | ||
`/ge/locations/${locationId}/users/${userId}/${role}` | ||
) | ||
} | ||
/** | ||
* Search for users who have been to this location | ||
@@ -112,0 +144,0 @@ * |
{ | ||
"name": "sprucebot-node", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Jam with the Sprucebot API in your favorite scripting language. 🤓", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -28,7 +28,6 @@ module.exports = { | ||
if (query) { | ||
pathWithQuery += '&' + this.serialize(query) | ||
pathWithQuery += this.serialize(query) | ||
} | ||
return pathWithQuery | ||
} | ||
} |
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
498524
8216