1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

APIs for flair (#542)

This commit is contained in:
David Baker
2017-09-18 14:44:40 +01:00
committed by Luke Barnard
parent 35f48d1c8e
commit 068939f790

View File

@@ -411,6 +411,16 @@ MatrixBaseApis.prototype.getGroupSummary = function(groupId) {
return this._http.authedRequest(undefined, "GET", path); return this._http.authedRequest(undefined, "GET", path);
}; };
/**
* @param {string} groupId
* @return {module:client.Promise} Resolves: Group profile object
* @return {module:http-api.MatrixError} Rejects: with an error response.
*/
MatrixBaseApis.prototype.getGroupProfile = function(groupId) {
const path = utils.encodeUri("/groups/$groupId/profile", {$groupId: groupId});
return this._http.authedRequest(undefined, "GET", path);
};
/** /**
* @param {string} groupId * @param {string} groupId
* @param {Object} profile The group profile object * @param {Object} profile The group profile object
@@ -515,6 +525,26 @@ MatrixBaseApis.prototype.createGroup = function(content) {
); );
}; };
/**
* @param {string[]} userIds List of user IDs
* @return {module:client.Promise} Resolves: Object as exmaple below
*
* {
* "users": {
* "@bob:example.com": {
* "+example:example.com"
* }
* }
* }
* @return {module:http-api.MatrixError} Rejects: with an error response.
*/
MatrixBaseApis.prototype.getPublicisedGroups = function(userIds) {
const path = utils.encodeUri("/publicised_groups");
return this._http.authedRequest(
undefined, "POST", path, undefined, { user_ids: userIds },
);
};
/** /**
* Retrieve a state event. * Retrieve a state event.
* @param {string} roomId * @param {string} roomId