get a /sync response which contains a single e2e room (ROOM_ID), with the
members given

@param {string[]} roomMembers

@return {object} sync response
12670
function getSyncResponse(roomMembers) {
    const stateEvents = [
        testUtils.mkEvent({
            type: 'm.room.encryption',
            skey: '',
            content: {
                algorithm: 'm.megolm.v1.aes-sha2',
            },
        }),
    ];

    Array.prototype.push.apply(
        stateEvents,
        roomMembers.map(
            (m) => testUtils.mkMembership({
                mship: 'join',
                sender: m,
            }),
        ),
    );

    const syncResponse = {
        next_batch: 1,
        rooms: {
            join: {
                [ROOM_ID]: {
                    state: {
                        events: stateEvents,
                    },
                },
            },
        },
    };

    return syncResponse;
}
73936
function(roomName, appRoomObj, callback) {
                // Join room. Creates a default connection room object
                e.app[appName].connection[easyrtcid].room[roomName] = {
                    apiField: {},
                    enteredOn: Date.now(),
                    gotListOn: Date.now(),
                    clientList: {},
                    toRoom: e.app[appName].room[roomName]
                };

                // Add easyrtcid to room clientList
                e.app[appName].room[roomName].clientList[easyrtcid] = {
                    enteredOn: Date.now(),
                    modifiedOn: Date.now(),
                    toConnection: e.app[appName].connection[easyrtcid]
                };

                // Returns connection room object to callback.
                connectionObj.room(roomName, callback);
            }
459769
def get_rooms(self, sid, namespace):
        """"""
        r = []
        try:
            for room_name, room in six.iteritems(self.rooms[namespace]):
                if room_name is not None and sid in room and room[sid]:
                    r.append(room_name)
        except KeyError:
            pass
        return r
408070
def join(self, room_str):
        """"""
        response = self.user_api.join_room(room_str)
        return self._mkroom(response["room_id"])
558479
public ResponseWrapper addChatRoomMember(long roomId, Members members)
            throws APIConnectionException, APIRequestException {
        Preconditions.checkArgument(roomId > 0, "room id is invalid");
        Preconditions.checkArgument(members != null, "members should not be empty");
        return _httpClient.sendPut(_baseUrl + mChatRoomPath + "/" + roomId + "/members", members.toString());
    }
1296665
public MUCRoomEntity getChatRoom(String roomName) {
		return restClient.get("chatrooms/" + roomName, MUCRoomEntity.class, new HashMap<String, String>());
	}
999790
function( roomID ) {

		if( keys.length > 0 ) {

			var randIdx = Math.round( Math.random() * ( keys.length - 1 ) ),
				key = keys.splice( randIdx, 1 )[ 0 ];

			keyToId[ key ] = roomID;
			idToKey[ roomID ] = key;

			return promise.resolve( key );
		} else {

			return promise.reject( 'Run out of keys' );
		}
	}
1100488
def add_member(user, room_roles=['room_member'])
      response = self.class.put(@api.member_config[:url]+"/#{user}",
        :query => { :auth_token => @token },
        :body => {
          :room_roles => room_roles
        }.to_json,
        :headers => @api.headers)

      ErrorHandler.response_code_to_exception_for :room, room_id, response
      true
    end
971780
function( userId ) {

		return this.memory.createRoom( userId )
			   .then( function( id ) {

			   		rooms[ id ] = room( this.memory, id );
			   			
						return promise.resolve( rooms[ id ] );
			   }.bind( this ), function() {

			   		return promise.reject( 'could not get a roomID to create a room' );
			   });
	}
362372
public ChatRoomMemberList getChatRoomMembers(long roomId, int start, int count)
            throws APIConnectionException, APIRequestException {
        return _chatRoomClient.getChatRoomMembers(roomId, start, count);
    }
1301212
function( userId, id ) {

		return this.memory.joinRoom( userId, id )
		.then( function( id ) {

			if( rooms[ id ] === undefined ) {

				rooms[ id ] = room( this.memory, id );	
			}
			
			return promise.resolve( rooms[ id ] );
		}.bind( this ));
	}
141848
function getMembers(index) {
  if (this._members === undefined) {
    this._members = _(getValue(this, 'member') || getValue(this, 'memberOf'))
      .split(/,\s*/)
      .compact()
      .sort(util.compareNatural)
      .value();
  }
  var result = this._members;
  return index === undefined ? result : result[index];
}
767114
function getPeerByRTCId(id)
    {
        for(var num = 0; num < scope._servConn.roomUsers.length; num++)
        {
            if(scope._servConn.roomUsers[num].rtcId == id)
            {
                return scope._servConn.roomUsers[num];
            }
        }
        return null;
    }
516641
def rooms(&callback)
      http(:get, "/rooms.json") do |data, http|
        if data && data[:rooms]
          callback.call(data[:rooms].map{|room| Firering::Room.instantiate(self, room)}) if callback
        else
          logger.error(http.response)
          callback.call([])
        end
      end
    end
194903
function( roomID, key ) {

		var oldVal;

		if( roomData[ roomID ] === undefined ) {

			return promise.reject( 'There is no room by that id' );
		} else {

			oldVal = roomData[ roomID ][ key ];

			delete roomData[ roomID ][ key ];

			return promise.resolve( oldVal );
		}
	}
553130
public ResponseWrapper addChatRoomMember(long roomId, Members members)
            throws APIConnectionException, APIRequestException {
        return _chatRoomClient.addChatRoomMember(roomId, members);
    }
382444
function(){
		var sides=[], len=this.components.length, adjs={}, bd=this.board;
		for(var r=0;r<this.components.length;r++){ this.components[r].id = r;}
		for(var id=0;id<bd.border.length;id++){
			var room1=this.getComponentRefs(bd.border[id].sidecell[0]);
			var room2=this.getComponentRefs(bd.border[id].sidecell[1]);
			if(room1===room2 || !room1 || !room2){ continue;}

			var key = (room1.id<room2.id ? room1.id*len+room2.id : room2.id*len+room1.id);
			if(!!adjs[key]){ continue;}
			adjs[key] = true;

			sides.push([room1,room2]);
		}
		return sides;
	}