You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
expose getDevice API
This commit is contained in:
@@ -1518,6 +1518,21 @@ MatrixBaseApis.prototype.getDevices = function() {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets specific device details for the logged-in user
|
||||||
|
* @param {string} device_id device to query
|
||||||
|
* @return {Promise} Resolves: result object
|
||||||
|
* @return {module:http-api.MatrixError} Rejects: with an error response.
|
||||||
|
*/
|
||||||
|
MatrixBaseApis.prototype.getDevice = function(device_id) {
|
||||||
|
const path = utils.encodeUri("/devices/$device_id", {
|
||||||
|
$device_id: device_id,
|
||||||
|
});
|
||||||
|
return this._http.authedRequest(
|
||||||
|
undefined, 'GET', path, undefined, undefined,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the given device
|
* Update the given device
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user