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

-- 非同期スクリプトは通常、API のレスポンスには影響を与えません。
-- ログ出力や分析、外部通知などに使用します。

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

-- 非同期スクリプトは通常、API のレスポンスには影響を与えません。
-- ログ出力や分析、外部通知などに使用します。

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

-- 非同期スクリプトは通常、API のレスポンスには影響を与えません。
-- ログ出力や分析、外部通知などに使用します。

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

-- 非同期スクリプトは通常、API のレスポンスには影響を与えません。
-- ログ出力や分析、外部通知などに使用します。

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

-- 非同期スクリプトは通常、API のレスポンスには影響を与えません。
-- ログ出力や分析、外部通知などに使用します。

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

-- 非同期スクリプトは通常、API のレスポンスには影響を与えません。
-- ログ出力や分析、外部通知などに使用します。

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

-- 非同期スクリプトは通常、API のレスポンスには影響を与えません。
-- ログ出力や分析、外部通知などに使用します。

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

-- 非同期スクリプトは通常、API のレスポンスには影響を与えません。
-- ログ出力や分析、外部通知などに使用します。

result = {
}