Packagecom.smartfoxserver.v2.entities.invitation
Classpublic class SFSInvitation
InheritanceSFSInvitation Inheritance Object
Implements Invitation

The SFSInvitation object contains all the informations about an invitation received by the current user.

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

InviteUsersRequest
InvitationReplyRequest
invitation event


Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined By
  
SFSInvitation(inviter:User, invitee:User, secondsForAnswer:int = 15, params:ISFSObject = null)
Creates a new SFSInvitation instance.
SFSInvitation
Property Detail
idproperty
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.


Implementation
    public function get id():int
    public function set id(value:int):void
inviteeproperty 
invitee:User  [read-only]

Returns the User object corresponding to the user who received the invitation.


Implementation
    public function get invitee():User
inviterproperty 
inviter:User  [read-only]

Returns the User object corresponding to the user who sent the invitation.


Implementation
    public function get inviter():User
paramsproperty 
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.


Implementation
    public function get params():ISFSObject
secondsForAnswerproperty 
secondsForAnswer:int  [read-only]

Returns the number of seconds available to the invitee to reply to the invitation, after which the invitation expires.


Implementation
    public function get secondsForAnswer():int
Constructor Detail
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.

Parameters
inviter: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