Trigger Reference of GS2-Friend Script
Reference for event triggers that call extended scripts, as defined in GS2-Friend
updateProfile
Event trigger to call GS2-Script before profile is updated.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
profile | Profile | Profile |
oldProfile | Profile | Old Profile |
publicProfile | string | New Public profile |
followerProfile | string | New Profile for followers |
friendProfile | string | New Profile for friends |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow profile update |
Implementation Example
namespace = args.namespace
profile = args.profile
oldProfile = args.oldProfile
publicProfile = args.publicProfile
followerProfile = args.followerProfile
friendProfile = args.friendProfile
result = {
permit=permit
}
updateProfileDone
GS2-Script called after profile is updated.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
oldProfile | Profile | Profile before update |
profile | Profile | Profile after update |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
oldProfile = args.oldProfile
profile = args.profile
result = {
}
follow
Event trigger to call GS2-Script before follow-up.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
followUser | FollowUser | Follow Information |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow follow |
Implementation Example
namespace = args.namespace
followUser = args.followUser
result = {
permit=permit
}
followDone
GS2-Script called after follow-up.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
followUser | FollowUser | Follow Information |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
followUser = args.followUser
result = {
}
unfollow
Event trigger to call GS2-Script before unfollowing.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
followUser | FollowUser | Follow Information |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow Unfollow |
Implementation Example
namespace = args.namespace
followUser = args.followUser
result = {
permit=permit
}
unfollowDone
GS2-Script called after unfollowing.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
followUser | FollowUser | Follow Information |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
followUser = args.followUser
result = {
}
deleteFriend
Event trigger to call GS2-Script before a friend is deleted.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
userId | string | User Id |
friendUser | FriendUser | Friend |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow Delete Friend |
Implementation Example
namespace = args.namespace
userId = args.userId
friendUser = args.friendUser
result = {
permit=permit
}
deleteFriendDone
GS2-Script called after a friend is deleted.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
userId | string | User Id |
friendUser | FriendUser | Friend |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
userId = args.userId
friendUser = args.friendUser
result = {
}
sendRequest
Event trigger to call GS2-Script before Issue a friend request.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
friendRequest | FriendRequest | Friend Request |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow friend requests to be issued |
Implementation Example
namespace = args.namespace
friendRequest = args.friendRequest
result = {
permit=permit
}
sendRequestDone
GS2-Script called after Issue a friend request.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
friendRequest | FriendRequest | Friend Request |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
friendRequest = args.friendRequest
result = {
}
cancelRequest
Event trigger to call GS2-Script before cancel a friend request.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
friendRequest | FriendRequest | Friend Request |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow cancellation of friend request |
Implementation Example
namespace = args.namespace
friendRequest = args.friendRequest
result = {
permit=permit
}
cancelRequestDone
GS2-Script called after cancel a friend request.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
friendRequest | FriendRequest | Friend Request |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
friendRequest = args.friendRequest
result = {
}
acceptRequest
Event trigger to call GS2-Script before a friend request is accepted.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
friendRequest | FriendRequest | Friend Request |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Accept friend request Allow |
Implementation Example
namespace = args.namespace
friendRequest = args.friendRequest
result = {
permit=permit
}
acceptRequestDone
GS2-Script called after a friend request is accepted.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
friendRequest | FriendRequest | Friend Request |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
friendRequest = args.friendRequest
result = {
}
rejectRequest
Event trigger to call GS2-Script before a friend request is rejected.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
friendRequest | FriendRequest | Friend Request |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow or deny friend request |
Implementation Example
namespace = args.namespace
friendRequest = args.friendRequest
result = {
permit=permit
}
rejectRequestDone
GS2-Script called after a friend request is rejected.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
friendRequest | FriendRequest | Friend Request |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
friendRequest = args.friendRequest
result = {
}