==================================================== GS2-Matchmaking ==================================================== **Create Client** .. code-block:: lua matchmaking_client = client('matchmaking') .. contents:: 目次 :local: :depth: 2 Method ==================================================== ---------------------------------------------------- anybody_describe_joined_user ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:anybody_describe_joined_user(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end ギャザリングの参加者一覧を取得します マッチメイキングが成立すると 404 Not Found 応答が返るようになります。 404応答を返すようになる直前にコールバックエンドポイントに確定した参加者一覧情報が渡されるため、 コールバックを受け取ってからは本APIを呼び出さないように実装するべきです。 - 消費クオータ: 3 Request ---------------------------------------------------- .. include:: control/AnybodyDescribeJoinedUserRequest.rst Response ---------------------------------------------------- .. include:: control/AnybodyDescribeJoinedUserResult.rst ---------------------------------------------------- anybody_do_matchmaking ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:anybody_do_matchmaking(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end Anybodyマッチメイキングを開始します すでに存在するギャザリングに参加するか、新しいギャザリングを新規作成します。 戻り値で参加したギャザリングIDが返りますので、そのIDを利用して後続のAPIを利用できます。 ギャザリングが成立した場合、マッチメイキングに設定したコールバックエンドポイントにギャザリング とそのギャザリングの参加者一覧が返されます。 コールバック後にギャザリング情報はマッチメイキングサーバから削除され、後続のAPIも利用できなくなります。 - 消費クオータ: 10 Request ---------------------------------------------------- .. include:: control/AnybodyDoMatchmakingRequest.rst Response ---------------------------------------------------- .. include:: control/AnybodyDoMatchmakingResult.rst ---------------------------------------------------- anybody_leave_gathering ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:anybody_leave_gathering(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end ギャザリングから離脱します 本APIは確実に成功することを保証していません。 例えば、離脱する直前にギャザリングが成立した場合は 404 Not Found を応答します。 404応答を受け取った場合はすでにギャザリングが成立していないかを確認する必要があります。 - 消費クオータ: 10 Request ---------------------------------------------------- .. include:: control/AnybodyLeaveGatheringRequest.rst Response ---------------------------------------------------- None ---------------------------------------------------- create_matchmaking ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:create_matchmaking(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end マッチメイキングを新規作成します Request ---------------------------------------------------- .. include:: control/CreateMatchmakingRequest.rst Response ---------------------------------------------------- .. include:: control/CreateMatchmakingResult.rst ---------------------------------------------------- custom_auto_describe_joined_user ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:custom_auto_describe_joined_user(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end ギャザリングの参加者一覧を取得します マッチメイキングが成立すると 404 Not Found 応答が返るようになります。 404応答を返すようになる直前にコールバックエンドポイントに確定した参加者一覧情報が渡されるため、 コールバックを受け取ってからは本APIを呼び出さないように実装するべきです。 - 消費クオータ: 3 Request ---------------------------------------------------- .. include:: control/CustomAutoDescribeJoinedUserRequest.rst Response ---------------------------------------------------- .. include:: control/CustomAutoDescribeJoinedUserResult.rst ---------------------------------------------------- custom_auto_do_matchmaking ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:custom_auto_do_matchmaking(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end カスタムオートマッチメイキングを開始します カスタムオートマッチメイキングは最大5つの属性値を指定してギャザリングを作成するか、 すでに存在するギャザリングの最大5つの属性値で、すべての属性値が指定した範囲内に収まっているギャザリングに参加します。 ギャザリングへの参加が成功した場合は done に true が返ります。 done に true が返った場合は、同時に item に参加したギャザリングの情報が格納されています。 done に false が返った場合は、一定時間内に存在するギャザリングの検索が完了しなかった場合に返ります。 この場合、searchContext に検索を継続するための情報が返ります。 引き続き検索を続けるために、再度APIを呼び出す際に引数に指定することで検索を再開することができます。 すべてのギャザリングを検索したが、条件にマッチするものがなかった場合、新しいギャザリングを作成し done に true が返ります。 - 消費クオータ: 10 Request ---------------------------------------------------- .. include:: control/CustomAutoDoMatchmakingRequest.rst Response ---------------------------------------------------- .. include:: control/CustomAutoDoMatchmakingResult.rst ---------------------------------------------------- custom_auto_leave_gathering ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:custom_auto_leave_gathering(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end ギャザリングから離脱します 本APIは確実に成功することを保証していません。 例えば、離脱する直前にギャザリングが成立した場合は 404 Not Found を応答します。 404応答を受け取った場合はすでにギャザリングが成立していないかを確認する必要があります。 - 消費クオータ: 10 Request ---------------------------------------------------- .. include:: control/CustomAutoLeaveGatheringRequest.rst Response ---------------------------------------------------- None ---------------------------------------------------- delete_matchmaking ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:delete_matchmaking(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end マッチメイキングを削除します Request ---------------------------------------------------- .. include:: control/DeleteMatchmakingRequest.rst Response ---------------------------------------------------- None ---------------------------------------------------- describe_matchmaking ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:describe_matchmaking(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end マッチメイキングの一覧を取得します Request ---------------------------------------------------- .. include:: control/DescribeMatchmakingRequest.rst Response ---------------------------------------------------- .. include:: control/DescribeMatchmakingResult.rst ---------------------------------------------------- describe_service_class ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:describe_service_class(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end サービスクラスの一覧を取得します Request ---------------------------------------------------- .. include:: control/DescribeServiceClassRequest.rst Response ---------------------------------------------------- .. include:: control/DescribeServiceClassResult.rst ---------------------------------------------------- get_matchmaking ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:get_matchmaking(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end マッチメイキングを取得します Request ---------------------------------------------------- .. include:: control/GetMatchmakingRequest.rst Response ---------------------------------------------------- .. include:: control/GetMatchmakingResult.rst ---------------------------------------------------- get_matchmaking_status ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:get_matchmaking_status(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end マッチメイキングのステータスを取得します Request ---------------------------------------------------- .. include:: control/GetMatchmakingStatusRequest.rst Response ---------------------------------------------------- .. include:: control/GetMatchmakingStatusResult.rst ---------------------------------------------------- passcode_breakup_gathering ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:passcode_breakup_gathering(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end ギャザリングを解散します - 消費クオータ: 10 Request ---------------------------------------------------- .. include:: control/PasscodeBreakupGatheringRequest.rst Response ---------------------------------------------------- None ---------------------------------------------------- passcode_create_gathering ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:passcode_create_gathering(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end パスコード付きギャザリングを新規作成します パスコードは8桁の数字で構成されたものが自動的に発行されます。 パスコードの解像度的に秒間100を超える勢いでギャザリングを作成する必要がある場合は オートマッチメイキングと組み合わせる必要があります。 - 消費クオータ: 10 Request ---------------------------------------------------- .. include:: control/PasscodeCreateGatheringRequest.rst Response ---------------------------------------------------- .. include:: control/PasscodeCreateGatheringResult.rst ---------------------------------------------------- passcode_describe_joined_user ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:passcode_describe_joined_user(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end ギャザリングの参加者一覧を取得します マッチメイキングが成立すると 404 Not Found 応答が返るようになります。 404応答を返すようになる直前にコールバックエンドポイントに確定した参加者一覧情報が渡されるため、 コールバックを受け取ってからは本APIを呼び出さないように実装するべきです。 - 消費クオータ: 3 Request ---------------------------------------------------- .. include:: control/PasscodeDescribeJoinedUserRequest.rst Response ---------------------------------------------------- .. include:: control/PasscodeDescribeJoinedUserResult.rst ---------------------------------------------------- passcode_early_complete_gathering ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:passcode_early_complete_gathering(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end マッチメイキングを早期終了します - 消費クオータ: 10 Request ---------------------------------------------------- .. include:: control/PasscodeEarlyCompleteGatheringRequest.rst Response ---------------------------------------------------- None ---------------------------------------------------- passcode_join_gathering ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:passcode_join_gathering(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end パスコード付きギャザリングに参加します - 消費クオータ: 10 Request ---------------------------------------------------- .. include:: control/PasscodeJoinGatheringRequest.rst Response ---------------------------------------------------- .. include:: control/PasscodeJoinGatheringResult.rst ---------------------------------------------------- passcode_leave_gathering ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:passcode_leave_gathering(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end ギャザリングから離脱します 本APIは確実に成功することを保証していません。 例えば、離脱する直前にギャザリングが成立した場合は 404 Not Found を応答します。 404応答を受け取った場合はすでにギャザリングが成立していないかを確認する必要があります。 - 消費クオータ: 10 Request ---------------------------------------------------- .. include:: control/PasscodeLeaveGatheringRequest.rst Response ---------------------------------------------------- None ---------------------------------------------------- room_breakup_gathering ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:room_breakup_gathering(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end ギャザリングを解散します - 消費クオータ: 10 Request ---------------------------------------------------- .. include:: control/RoomBreakupGatheringRequest.rst Response ---------------------------------------------------- None ---------------------------------------------------- room_create_gathering ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:room_create_gathering(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end ギャザリングを新規作成します - 消費クオータ: 10 Request ---------------------------------------------------- .. include:: control/RoomCreateGatheringRequest.rst Response ---------------------------------------------------- .. include:: control/RoomCreateGatheringResult.rst ---------------------------------------------------- room_describe_gathering ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:room_describe_gathering(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end ギャザリング一覧を取得します - 消費クオータ: 20件あたり3クオータ Request ---------------------------------------------------- .. include:: control/RoomDescribeGatheringRequest.rst Response ---------------------------------------------------- .. include:: control/RoomDescribeGatheringResult.rst ---------------------------------------------------- room_describe_joined_user ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:room_describe_joined_user(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end ギャザリングの参加者一覧を取得します マッチメイキングが成立すると 404 Not Found 応答が返るようになります。 404応答を返すようになる直前にコールバックエンドポイントに確定した参加者一覧情報が渡されるため、 コールバックを受け取ってからは本APIを呼び出さないように実装するべきです。 - 消費クオータ: 3 Request ---------------------------------------------------- .. include:: control/RoomDescribeJoinedUserRequest.rst Response ---------------------------------------------------- .. include:: control/RoomDescribeJoinedUserResult.rst ---------------------------------------------------- room_early_complete_gathering ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:room_early_complete_gathering(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end マッチメイキングを早期終了します - 消費クオータ: 10 Request ---------------------------------------------------- .. include:: control/RoomEarlyCompleteGatheringRequest.rst Response ---------------------------------------------------- None ---------------------------------------------------- room_join_gathering ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:room_join_gathering(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end ギャザリングに参加します - 消費クオータ: 10 Request ---------------------------------------------------- .. include:: control/RoomJoinGatheringRequest.rst Response ---------------------------------------------------- .. include:: control/RoomJoinGatheringResult.rst ---------------------------------------------------- room_leave_gathering ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:room_leave_gathering(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end ギャザリングから離脱します 本APIは確実に成功することを保証していません。 例えば、離脱する直前にギャザリングが成立した場合は 404 Not Found を応答します。 404応答を受け取った場合はすでにギャザリングが成立していないかを確認する必要があります。 - 消費クオータ: 10 Request ---------------------------------------------------- .. include:: control/RoomLeaveGatheringRequest.rst Response ---------------------------------------------------- None ---------------------------------------------------- update_matchmaking ---------------------------------------------------- .. code-block:: lua response = matchmaking_client:update_matchmaking(request) if response.isError then -- エラー処理 -- print(response.statusCode) print(response.errorMessage) else -- 正常処理 -- print(response.result) end マッチメイキングを更新します Request ---------------------------------------------------- .. include:: control/UpdateMatchmakingRequest.rst Response ---------------------------------------------------- .. include:: control/UpdateMatchmakingResult.rst Model ==================================================== ---------------------------------------------------- CustomAutoGathering ---------------------------------------------------- .. include:: model/CustomAutoGathering.rst ---------------------------------------------------- AnybodyGathering ---------------------------------------------------- .. include:: model/AnybodyGathering.rst ---------------------------------------------------- PasscodeGathering ---------------------------------------------------- .. include:: model/PasscodeGathering.rst ---------------------------------------------------- RoomGathering ---------------------------------------------------- .. include:: model/RoomGathering.rst ---------------------------------------------------- Matchmaking ---------------------------------------------------- .. include:: model/Matchmaking.rst