GS2-Friend Script トリガー リファレンス
拡張スクリプトを呼び出す イベントトリガー のリファレンス
トリガー
updateProfile
プロフィールの更新
同期実行スクリプト
プロフィールの更新処理の前に、スクリプトが同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| profile | Profile | プロフィール |
| oldProfile | Profile | 更新前のプロフィール |
| publicProfile | string | 新しい公開されるプロフィール |
| followerProfile | string | 新しいフォロワー向けに公開されるプロフィール |
| friendProfile | string | 新しいフレンド向けに公開されるプロフィール |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|
| permit | bool | ✓ | プロフィールの更新 を許可するか |
実装例
-- Request
local namespace = args.namespace
local profile = args.profile
local oldProfile = args.oldProfile
local publicProfile = args.publicProfile
local followerProfile = args.followerProfile
local friendProfile = args.friendProfile
-- Business logic:
local permit = true
-- Result
result = {
permit=permit
}非同期実行スクリプト
プロフィールの更新処理の後に、スクリプトが非同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| oldProfile | Profile | 更新前のプロフィール |
| profile | Profile | 更新後のプロフィール |
実装例
-- Request
local namespace = args.namespace
local oldProfile = args.oldProfile
local profile = args.profile
-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.
result = {
}follow
フォロー
同期実行スクリプト
フォロー処理の前に、スクリプトが同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| followUser | FollowUser | フォロー情報 |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|
| permit | bool | ✓ | フォロー を許可するか |
実装例
-- Request
local namespace = args.namespace
local followUser = args.followUser
-- Business logic:
local permit = true
-- Result
result = {
permit=permit
}非同期実行スクリプト
フォロー処理の後に、スクリプトが非同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| followUser | FollowUser | フォロー情報 |
実装例
-- Request
local namespace = args.namespace
local followUser = args.followUser
-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.
result = {
}unfollow
アンフォロー
同期実行スクリプト
アンフォロー処理の前に、スクリプトが同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| followUser | FollowUser | フォロー情報 |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|
| permit | bool | ✓ | アンフォロー を許可するか |
実装例
-- Request
local namespace = args.namespace
local followUser = args.followUser
-- Business logic:
local permit = true
-- Result
result = {
permit=permit
}非同期実行スクリプト
アンフォロー処理の後に、スクリプトが非同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| followUser | FollowUser | フォロー情報 |
実装例
-- Request
local namespace = args.namespace
local followUser = args.followUser
-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.
result = {
}deleteFriend
フレンドを削除
同期実行スクリプト
フレンドを削除処理の前に、スクリプトが同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| userId | string | ユーザーID |
| friendUser | FriendUser | フレンド |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|
| permit | bool | ✓ | フレンドの削除 を許可するか |
実装例
-- Request
local namespace = args.namespace
local userId = args.userId
local friendUser = args.friendUser
-- Business logic:
local permit = true
-- Result
result = {
permit=permit
}非同期実行スクリプト
フレンドを削除処理の後に、スクリプトが非同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| userId | string | ユーザーID |
| friendUser | FriendUser | フレンド |
実装例
-- Request
local namespace = args.namespace
local userId = args.userId
local friendUser = args.friendUser
-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.
result = {
}sendRequest
フレンドリクエスト発行
同期実行スクリプト
フレンドリクエスト発行処理の前に、スクリプトが同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| friendRequest | FriendRequest | フレンドリクエスト |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|
| permit | bool | ✓ | フレンドリクエストの発行 を許可するか |
実装例
-- Request
local namespace = args.namespace
local friendRequest = args.friendRequest
-- Business logic:
local permit = true
-- Result
result = {
permit=permit
}非同期実行スクリプト
フレンドリクエスト発行処理の後に、スクリプトが非同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| friendRequest | FriendRequest | フレンドリクエスト |
実装例
-- Request
local namespace = args.namespace
local friendRequest = args.friendRequest
-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.
result = {
}cancelRequest
フレンドリクエストのキャンセル
同期実行スクリプト
フレンドリクエストのキャンセル処理の前に、スクリプトが同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| friendRequest | FriendRequest | フレンドリクエスト |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|
| permit | bool | ✓ | フレンドリクエストのキャンセル を許可するか |
実装例
-- Request
local namespace = args.namespace
local friendRequest = args.friendRequest
-- Business logic:
local permit = true
-- Result
result = {
permit=permit
}非同期実行スクリプト
フレンドリクエストのキャンセル処理の後に、スクリプトが非同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| friendRequest | FriendRequest | フレンドリクエスト |
実装例
-- Request
local namespace = args.namespace
local friendRequest = args.friendRequest
-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.
result = {
}acceptRequest
フレンドリクエストの承諾
同期実行スクリプト
フレンドリクエストの承諾処理の前に、スクリプトが同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| friendRequest | FriendRequest | フレンドリクエスト |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|
| permit | bool | ✓ | フレンドリクエストの承諾 を許可するか |
実装例
-- Request
local namespace = args.namespace
local friendRequest = args.friendRequest
-- Business logic:
local permit = true
-- Result
result = {
permit=permit
}非同期実行スクリプト
フレンドリクエストの承諾処理の後に、スクリプトが非同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| friendRequest | FriendRequest | フレンドリクエスト |
実装例
-- Request
local namespace = args.namespace
local friendRequest = args.friendRequest
-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.
result = {
}rejectRequest
フレンドリクエストの拒否
同期実行スクリプト
フレンドリクエストの拒否処理の前に、スクリプトが同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| friendRequest | FriendRequest | フレンドリクエスト |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|
| permit | bool | ✓ | フレンドリクエストの拒否 を許可するか |
実装例
-- Request
local namespace = args.namespace
local friendRequest = args.friendRequest
-- Business logic:
local permit = true
-- Result
result = {
permit=permit
}非同期実行スクリプト
フレンドリクエストの拒否処理の後に、スクリプトが非同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| friendRequest | FriendRequest | フレンドリクエスト |
実装例
-- Request
local namespace = args.namespace
local friendRequest = args.friendRequest
-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.
result = {
}