GS2-Matchmaking¶
Create Client
matchmaking_client = client('matchmaking')
目次
- Method
- anybody_describe_joined_user
- anybody_do_matchmaking
- anybody_leave_gathering
- create_matchmaking
- custom_auto_describe_joined_user
- custom_auto_do_matchmaking
- custom_auto_leave_gathering
- delete_matchmaking
- describe_matchmaking
- describe_service_class
- get_matchmaking
- get_matchmaking_status
- passcode_breakup_gathering
- passcode_create_gathering
- passcode_describe_joined_user
- passcode_early_complete_gathering
- passcode_join_gathering
- passcode_leave_gathering
- room_breakup_gathering
- room_create_gathering
- room_describe_gathering
- room_describe_joined_user
- room_early_complete_gathering
- room_join_gathering
- room_leave_gathering
- update_matchmaking
- Model
Method¶
anybody_describe_joined_user¶
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¶
{
matchmakingName=string,
gatheringId=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- gatheringId
- [string] ギャザリングのIDを指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
anybody_do_matchmaking¶
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¶
{
matchmakingName=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
anybody_leave_gathering¶
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¶
{
matchmakingName=string,
gatheringId=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- gatheringId
- [string] ギャザリングのIDを指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
Response¶
None
create_matchmaking¶
response = matchmaking_client:create_matchmaking(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
マッチメイキングを新規作成します
Request¶
{
name=string,
serviceClass=string,
gatheringPoolName=string,
callback=string,
maxPlayer=number,
notificationGameName=string,
type=string,
description=string,
}
- name
- [string] マッチメイキングの名前
- serviceClass
- [string] マッチメイキングのサービスクラス
- gatheringPoolName
- [string] GS2-Realtime のギャザリングプール名
- callback
- [string] マッチメイキング完了コールバックURL
- maxPlayer
- [number] 最大プレイヤー数
- notificationGameName
- [string] GS2-InGamePushNotification のゲーム名
- type
- [string] マッチメイキングの種類
- description
- [string] マッチメイキングの説明
custom_auto_describe_joined_user¶
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¶
{
matchmakingName=string,
gatheringId=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- gatheringId
- [string] ギャザリングのIDを指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
custom_auto_do_matchmaking¶
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¶
{
matchmakingName=string,
searchAttribute2Max=number,
searchAttribute1Min=number,
searchAttribute5Min=number,
searchAttribute4Min=number,
attribute3=number,
searchAttribute3Max=number,
searchAttribute4Max=number,
searchAttribute1Max=number,
searchContext=string,
searchAttribute5Max=number,
searchAttribute3Min=number,
attribute2=number,
searchAttribute2Min=number,
attribute1=number,
attribute4=number,
attribute5=number,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- searchAttribute2Max
- [number] 既存のギャザリングに参加する対象とする属性値2の最大値
- searchAttribute1Min
- [number] 既存のギャザリングに参加する対象とする属性値1の最小値
- searchAttribute5Min
- [number] 既存のギャザリングに参加する対象とする属性値5の最小値
- searchAttribute4Min
- [number] 既存のギャザリングに参加する対象とする属性値4の最小値
- attribute3
- [number] ギャザリングを新規作成する場合の属性値3
- searchAttribute3Max
- [number] 既存のギャザリングに参加する対象とする属性値3の最大値
- searchAttribute4Max
- [number] 既存のギャザリングに参加する対象とする属性値4の最大値
- searchAttribute1Max
- [number] 既存のギャザリングに参加する対象とする属性値1の最大値
- searchContext
- [string] 中断された検索を再開するためのコンテキスト
- searchAttribute5Max
- [number] 既存のギャザリングに参加する対象とする属性値5の最大値
- searchAttribute3Min
- [number] 既存のギャザリングに参加する対象とする属性値3の最小値
- attribute2
- [number] ギャザリングを新規作成する場合の属性値2
- searchAttribute2Min
- [number] 既存のギャザリングに参加する対象とする属性値2の最小値
- attribute1
- [number] ギャザリングを新規作成する場合の属性値1
- attribute4
- [number] ギャザリングを新規作成する場合の属性値4
- attribute5
- [number] ギャザリングを新規作成する場合の属性値5
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
Response¶
- searchContext
- [string] 検索を再開するためのコンテキスト
- item
- [CustomAutoGathering] CustomAutoマッチメイキング ギャザリング
- done
- [boolean] マッチメイキングが完了したか
custom_auto_leave_gathering¶
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¶
{
matchmakingName=string,
gatheringId=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- gatheringId
- [string] ギャザリングのIDを指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
Response¶
None
delete_matchmaking¶
response = matchmaking_client:delete_matchmaking(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
マッチメイキングを削除します
Response¶
None
describe_matchmaking¶
response = matchmaking_client:describe_matchmaking(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
マッチメイキングの一覧を取得します
Request¶
{
pageToken=string,
limit=number,
}
- pageToken
- [string] データの取得を開始する位置を指定するトークン
- limit
- [number] データの取得件数
describe_service_class¶
response = matchmaking_client:describe_service_class(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
サービスクラスの一覧を取得します
Request¶
{
}
get_matchmaking¶
response = matchmaking_client:get_matchmaking(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
マッチメイキングを取得します
get_matchmaking_status¶
response = matchmaking_client:get_matchmaking_status(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
マッチメイキングのステータスを取得します
passcode_breakup_gathering¶
response = matchmaking_client:passcode_breakup_gathering(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
ギャザリングを解散します
- 消費クオータ: 10
Request¶
{
matchmakingName=string,
gatheringId=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- gatheringId
- [string] ギャザリングIDを指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
Response¶
None
passcode_create_gathering¶
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¶
{
matchmakingName=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
passcode_describe_joined_user¶
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¶
{
matchmakingName=string,
gatheringId=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- gatheringId
- [string] ギャザリングのIDを指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
passcode_early_complete_gathering¶
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¶
{
matchmakingName=string,
gatheringId=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- gatheringId
- [string] ギャザリングIDを指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
Response¶
None
passcode_join_gathering¶
response = matchmaking_client:passcode_join_gathering(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
パスコード付きギャザリングに参加します
- 消費クオータ: 10
Request¶
{
matchmakingName=string,
passcode=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- passcode
- [string] ギャザリングのパスコードを指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
passcode_leave_gathering¶
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¶
{
matchmakingName=string,
gatheringId=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- gatheringId
- [string] ギャザリングのIDを指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
Response¶
None
room_breakup_gathering¶
response = matchmaking_client:room_breakup_gathering(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
ギャザリングを解散します
- 消費クオータ: 10
Request¶
{
matchmakingName=string,
gatheringId=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- gatheringId
- [string] ギャザリングIDを指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
Response¶
None
room_create_gathering¶
response = matchmaking_client:room_create_gathering(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
ギャザリングを新規作成します
- 消費クオータ: 10
Request¶
{
matchmakingName=string,
meta=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- meta
- [string] ギャザリングのメタ情報
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
room_describe_gathering¶
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¶
{
matchmakingName=string,
pageToken=string,
limit=number,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- pageToken
- [string] データの取得を開始する位置を指定するトークン
- limit
- [number] データの取得件数
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
room_describe_joined_user¶
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¶
{
matchmakingName=string,
gatheringId=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- gatheringId
- [string] ギャザリングのIDを指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
room_early_complete_gathering¶
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¶
{
matchmakingName=string,
gatheringId=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- gatheringId
- [string] ギャザリングIDを指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
Response¶
None
room_join_gathering¶
response = matchmaking_client:room_join_gathering(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
ギャザリングに参加します
- 消費クオータ: 10
Request¶
{
matchmakingName=string,
gatheringId=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- gatheringId
- [string] ギャザリングIDを指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
room_leave_gathering¶
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¶
{
matchmakingName=string,
gatheringId=string,
accessToken=string
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- gatheringId
- [string] ギャザリングのIDを指定します。
- accessToken
- [string] GS2-Auth で発行を受けたアクセストークン
Response¶
None
update_matchmaking¶
response = matchmaking_client:update_matchmaking(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
マッチメイキングを更新します
Request¶
{
matchmakingName=string,
callback=string,
serviceClass=string,
description=string,
notificationGameName=string,
gatheringPoolName=string,
}
- matchmakingName
- [string] マッチメイキングの名前を指定します。
- callback
- [string] マッチメイキング完了コールバックURL
- serviceClass
- [string] マッチメイキングのサービスクラス
- description
- [string] マッチメイキングの説明
- notificationGameName
- [string] GS2-InGamePushNotification のゲーム名
- gatheringPoolName
- [string] GS2-Realtime のギャザリングプール名
Model¶
CustomAutoGathering¶
- createAt
- [number] 作成日時(エポック秒)
- gatheringId
- [string] ギャザリングGRN
- attribute2
- [number] 属性値2
- attribute3
- [number] 属性値3
- attribute1
- [number] 属性値1
- updateAt
- [number] 更新日時(エポック秒)
- joinPlayer
- [number] 参加プレイヤー数
- attribute4
- [number] 属性値4
- attribute5
- [number] 属性値5
AnybodyGathering¶
- createAt
- [number] 作成日時(エポック秒)
- updateAt
- [number] 更新日時(エポック秒)
- joinPlayer
- [number] 参加プレイヤー数
- gatheringId
- [string] ギャザリングGRN
PasscodeGathering¶
- ownerUserId
- [string] ギャザリングを作成したユーザID
- createAt
- [number] 作成日時(エポック秒)
- gatheringId
- [string] ギャザリングGRN
- passcode
- [string] ギャザリングに参加するために必要なパスコード
- updateAt
- [number] 更新日時(エポック秒)
- joinPlayer
- [number] 参加プレイヤー数
RoomGathering¶
- meta
- [string] ギャザリングメタデータ
ルームの募集条件などを 128バイト以内で指定できます。
- gatheringId
- [string] ギャザリングGRN
- ownerUserId
- [string] ギャザリングを作成したユーザID
- updateAt
- [number] 更新日時(エポック秒)
- joinPlayer
- [number] 参加プレイヤー数
- createAt
- [number] 作成日時(エポック秒)
Matchmaking¶
- name
- [string] マッチメイキング名
- type
- [string] マッチメイキング方式
- matchmakingId
- [string] マッチメイキングGRN
- serviceClass
- [string] サービスクラス
- gatheringPoolName
- [string] マッチメイキング完了時に GS2-Realtime と自動的に連携する場合に指定するギャザリングプール名
- callback
- [string] マッチメイキング完了時の通知先URL
- createAt
- [number] 作成日時(エポック秒)
- maxPlayer
- [number] 最大プレイヤー数
- notificationGameName
- [string] マッチメイキングの状態変化や完了通知を GS2-InGamePushNotification を使用して通知する場合に指定するゲーム名
- ownerId
- [string] オーナーID
- updateAt
- [number] 最終更新日時(エポック秒)
- description
- [string] 説明文