Package | com.smartfoxserver.v2.entities.invitation |
Class | public class SFSInvitation |
Inheritance | SFSInvitation Object |
Implements | Invitation |
An invitation is sent through the InviteUsersRequest request and it is received as an invitation event. Clients can reply to an invitation using the InvitationReplyRequest request.
See also
Property | Defined By | ||
---|---|---|---|
id : int
Indicates the id of this invitation. | SFSInvitation | ||
invitee : User [read-only]
Returns the User object corresponding to the user who received the invitation. | SFSInvitation | ||
inviter : User [read-only]
Returns the User object corresponding to the user who sent the invitation. | SFSInvitation | ||
params : ISFSObject [read-only]
Returns an instance of SFSObject containing a custom set of parameters. | SFSInvitation | ||
secondsForAnswer : int [read-only]
Returns the number of seconds available to the invitee to reply to the invitation, after which the invitation expires. | SFSInvitation |
Method | Defined By | ||
---|---|---|---|
Creates a new SFSInvitation instance. | SFSInvitation |
id | property |
id:int
Indicates the id of this invitation. It is generated by the server when the invitation is sent.
NOTE: setting the id property manually has no effect on the server and can disrupt the API functioning.
public function get id():int
public function set id(value:int):void
invitee | property |
invitee:User
[read-only] Returns the User object corresponding to the user who received the invitation.
public function get invitee():User
inviter | property |
inviter:User
[read-only] Returns the User object corresponding to the user who sent the invitation.
public function get inviter():User
params | property |
params:ISFSObject
[read-only] Returns an instance of SFSObject containing a custom set of parameters. It usually stores invitation details, like a message to the invitee and any other relevant data.
public function get params():ISFSObject
secondsForAnswer | property |
secondsForAnswer:int
[read-only] Returns the number of seconds available to the invitee to reply to the invitation, after which the invitation expires.
public function get secondsForAnswer():int
SFSInvitation | () | Constructor |
public function SFSInvitation(inviter:User, invitee:User, secondsForAnswer:int = 15, params:ISFSObject = null)
Creates a new SFSInvitation instance.
NOTE: developers never istantiate an SFSInvitation manually: this is done by the SmartFoxServer 2X API internally. A reference to an existing instance is always provided by the invitation event.
Parametersinviter:User — A User object corresponding to the user who sent the invitation.
| |
invitee:User — A User object corresponding to the user who received the invitation.
| |
secondsForAnswer:int (default = 15 ) — The number of seconds available to the invitee to reply to the invitation.
| |
params:ISFSObject (default = null ) — An instance of SFSObject containing a custom set of parameters representing the invitation details.
|
See also