diff --git a/index.js b/index.js index b484946..85addaa 100644 --- a/index.js +++ b/index.js @@ -489,6 +489,27 @@ module.exports = function (config, deps) { return cb(null,res.body); }); }, + /** + * Get info for a specific user, e.g. uploader destination (jellyfish/platform) + * + * @param {String} userId of the user to get info for + * @param cb + * @returns {cb} cb(err, response) + * e.g. {versions: {schema: 3, uploaderMinimum: '0.333.0'}, uploaderDestination:"jellyfish"} + */ + getInfoForUser: function (userId, cb) { + common.assertArgumentsSize(arguments, 2); + superagent + .get(common.makeUploadUrl('/info/' + userId)) + .retry() + .end( + function (err, res) { + if (err != null) { + return cb(err); + } + return cb(null,res.body); + }); + }, /** * Get server time * diff --git a/package.json b/package.json index 8d7ac28..776a4a2 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "node": ">=18" }, "packageManager": "yarn@3.6.4", - "version": "0.62.0-web-3400-strip-clinic-patient-update-fields.1", + "version": "0.62.0-getinfouser.2", "description": "Client-side library to interact with the Tidepool platform", "main": "tidepool.js", "repository": "https://github.com/tidepool-org/platform-client.git",