Package | com.smartfoxserver.v2.requests |
Class | public class UnsubscribeRoomGroupRequest |
Inheritance | UnsubscribeRoomGroupRequest com.smartfoxserver.v2.requests.BaseRequest |
If the operation is successful, the current user receives a roomGroupUnsubscribe event; otherwise the roomGroupUnsubscribeError event is fired.
See also
Method | Defined By | ||
---|---|---|---|
UnsubscribeRoomGroupRequest(groupId:String)
Creates a new UnsubscribeRoomGroupRequest instance. | UnsubscribeRoomGroupRequest |
UnsubscribeRoomGroupRequest | () | Constructor |
public function UnsubscribeRoomGroupRequest(groupId:String)
Creates a new UnsubscribeRoomGroupRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.
ParametersgroupId:String — The name of the Room Group to unsubscribe.
|
See also
private function someMethod():void { sfs.addEventListener(SFSEvent.ROOM_GROUP_UNSUBSCRIBE, onGroupUnsubscribed); sfs.addEventListener(SFSEvent.ROOM_GROUP_UNSUBSCRIBE_ERROR, onGroupUnsubscribeError); // Unsubscribe the "cardGames" group sfs.send(new UnsubscribeRoomGroupRequest("cardGames")); } private function onGroupUnsubscribed(evt:SFSEvent):void { trace("Group unsubscribed: " + evt.params.groupId); } private function onGroupUnsubscribeError(evt:SFSEvent):void { trace("Group unsubscribing failed: " + evt.params.errorMessage); }