GS2-Friend Script トリガー リファレンス

拡張スクリプトを呼び出す イベントトリガー のリファレンス

トリガー

updateProfile

プロフィールの更新

同期実行スクリプト

プロフィールの更新処理の前に、スクリプトが同期実行されます。

Request
説明
namespaceNamespaceネームスペース
profileProfileプロフィール
oldProfileProfile更新前のプロフィール
publicProfilestring新しい公開されるプロフィール
followerProfilestring新しいフォロワー向けに公開されるプロフィール
friendProfilestring新しいフレンド向けに公開されるプロフィール
Result
必須デフォルト値の制限説明
permitbool
プロフィールの更新 を許可するか
実装例
-- 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
説明
namespaceNamespaceネームスペース
oldProfileProfile更新前のプロフィール
profileProfile更新後のプロフィール
実装例
-- 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
説明
namespaceNamespaceネームスペース
followUserFollowUserフォロー情報
Result
必須デフォルト値の制限説明
permitbool
フォロー を許可するか
実装例
-- Request
local namespace = args.namespace
local followUser = args.followUser

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}

非同期実行スクリプト

フォロー処理の後に、スクリプトが非同期実行されます。

Request
説明
namespaceNamespaceネームスペース
followUserFollowUserフォロー情報
実装例
-- 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
説明
namespaceNamespaceネームスペース
followUserFollowUserフォロー情報
Result
必須デフォルト値の制限説明
permitbool
アンフォロー を許可するか
実装例
-- Request
local namespace = args.namespace
local followUser = args.followUser

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}

非同期実行スクリプト

アンフォロー処理の後に、スクリプトが非同期実行されます。

Request
説明
namespaceNamespaceネームスペース
followUserFollowUserフォロー情報
実装例
-- 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
説明
namespaceNamespaceネームスペース
userIdstringユーザーID
friendUserFriendUserフレンド
Result
必須デフォルト値の制限説明
permitbool
フレンドの削除 を許可するか
実装例
-- Request
local namespace = args.namespace
local userId = args.userId
local friendUser = args.friendUser

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}

非同期実行スクリプト

フレンドを削除処理の後に、スクリプトが非同期実行されます。

Request
説明
namespaceNamespaceネームスペース
userIdstringユーザーID
friendUserFriendUserフレンド
実装例
-- 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
説明
namespaceNamespaceネームスペース
friendRequestFriendRequestフレンドリクエスト
Result
必須デフォルト値の制限説明
permitbool
フレンドリクエストの発行 を許可するか
実装例
-- Request
local namespace = args.namespace
local friendRequest = args.friendRequest

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}

非同期実行スクリプト

フレンドリクエスト発行処理の後に、スクリプトが非同期実行されます。

Request
説明
namespaceNamespaceネームスペース
friendRequestFriendRequestフレンドリクエスト
実装例
-- 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
説明
namespaceNamespaceネームスペース
friendRequestFriendRequestフレンドリクエスト
Result
必須デフォルト値の制限説明
permitbool
フレンドリクエストのキャンセル を許可するか
実装例
-- Request
local namespace = args.namespace
local friendRequest = args.friendRequest

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}

非同期実行スクリプト

フレンドリクエストのキャンセル処理の後に、スクリプトが非同期実行されます。

Request
説明
namespaceNamespaceネームスペース
friendRequestFriendRequestフレンドリクエスト
実装例
-- 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
説明
namespaceNamespaceネームスペース
friendRequestFriendRequestフレンドリクエスト
Result
必須デフォルト値の制限説明
permitbool
フレンドリクエストの承諾 を許可するか
実装例
-- Request
local namespace = args.namespace
local friendRequest = args.friendRequest

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}

非同期実行スクリプト

フレンドリクエストの承諾処理の後に、スクリプトが非同期実行されます。

Request
説明
namespaceNamespaceネームスペース
friendRequestFriendRequestフレンドリクエスト
実装例
-- 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
説明
namespaceNamespaceネームスペース
friendRequestFriendRequestフレンドリクエスト
Result
必須デフォルト値の制限説明
permitbool
フレンドリクエストの拒否 を許可するか
実装例
-- Request
local namespace = args.namespace
local friendRequest = args.friendRequest

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}

非同期実行スクリプト

フレンドリクエストの拒否処理の後に、スクリプトが非同期実行されます。

Request
説明
namespaceNamespaceネームスペース
friendRequestFriendRequestフレンドリクエスト
実装例
-- 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 = {
}