GS2-Realtime

Create Client

realtime_client = client('realtime')

Method

create_gathering

response = realtime_client:create_gathering(request)
if response.isError then
  -- エラー処理 --
  print(response.statusCode)
  print(response.errorMessage)
else
  -- 正常処理 --
  print(response.result)
end

ギャザリングを作成します

Request

{
  gatheringPoolName=string,
  userIds=string,
  name=string,
}
  • gatheringPoolName
  • [string] ギャザリングプールの名前を指定します。
  • userIds
  • [string] カンマ区切りのギャザリングへの参加を許可するユーザIDリスト
  • name
  • [string] ギャザリング名

Response

  • item
  • [Gathering] 購読

create_gathering_pool

response = realtime_client:create_gathering_pool(request)
if response.isError then
  -- エラー処理 --
  print(response.statusCode)
  print(response.errorMessage)
else
  -- 正常処理 --
  print(response.result)
end

ギャザリングプールを新規作成します

Request

{
  name=string,
  description=string,
}
  • name
  • [string] ギャザリングプールの名前
  • description
  • [string] ギャザリングプールの説明

Response

  • item
  • [GatheringPool] ギャザリングプール

delete_gathering

response = realtime_client:delete_gathering(request)
if response.isError then
  -- エラー処理 --
  print(response.statusCode)
  print(response.errorMessage)
else
  -- 正常処理 --
  print(response.result)
end

ギャザリングを削除します

Request

{
  gatheringPoolName=string,
  gatheringName=string,
}
  • gatheringPoolName
  • [string] ギャザリングプールの名前を指定します。
  • gatheringName
  • [string] ギャザリングの名前を指定します。

Response

None

delete_gathering_pool

response = realtime_client:delete_gathering_pool(request)
if response.isError then
  -- エラー処理 --
  print(response.statusCode)
  print(response.errorMessage)
else
  -- 正常処理 --
  print(response.result)
end

ギャザリングプールを削除します

Request

{
  gatheringPoolName=string,
}
  • gatheringPoolName
  • [string] ギャザリングプールの名前を指定します。

Response

None

describe_gathering

response = realtime_client:describe_gathering(request)
if response.isError then
  -- エラー処理 --
  print(response.statusCode)
  print(response.errorMessage)
else
  -- 正常処理 --
  print(response.result)
end

ギャザリングの一覧を取得します

Request

{
  gatheringPoolName=string,
  pageToken=string,
  limit=number,
}
  • gatheringPoolName
  • [string] ギャザリングプールの名前を指定します。
  • pageToken
  • [string] データの取得を開始する位置を指定するトークン
  • limit
  • [number] データの取得件数

Response

  • nextPageToken
  • [string] 次のページを読み込むためのトークン
  • items
  • [table<Gathering>] 購読

describe_gathering_pool

response = realtime_client:describe_gathering_pool(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] データの取得件数

Response

  • nextPageToken
  • [string] 次のページを読み込むためのトークン
  • items
  • [table<GatheringPool>] ギャザリングプール

get_gathering

response = realtime_client:get_gathering(request)
if response.isError then
  -- エラー処理 --
  print(response.statusCode)
  print(response.errorMessage)
else
  -- 正常処理 --
  print(response.result)
end

ギャザリングを取得します

Request

{
  gatheringPoolName=string,
  gatheringName=string,
}
  • gatheringPoolName
  • [string] ギャザリングプールの名前を指定します。
  • gatheringName
  • [string] ギャザリングの名前を指定します。

Response

  • item
  • [Gathering] 購読

get_gathering_pool

response = realtime_client:get_gathering_pool(request)
if response.isError then
  -- エラー処理 --
  print(response.statusCode)
  print(response.errorMessage)
else
  -- 正常処理 --
  print(response.result)
end

ギャザリングプールを取得します

Request

{
  gatheringPoolName=string,
}
  • gatheringPoolName
  • [string] ギャザリングプールの名前を指定します。

Response

  • item
  • [GatheringPool] ギャザリングプール

update_gathering_pool

response = realtime_client:update_gathering_pool(request)
if response.isError then
  -- エラー処理 --
  print(response.statusCode)
  print(response.errorMessage)
else
  -- 正常処理 --
  print(response.result)
end

ギャザリングプールを更新します

Request

{
  gatheringPoolName=string,
  description=string,
}
  • gatheringPoolName
  • [string] ギャザリングプールの名前を指定します。
  • description
  • [string] ギャザリングプールの説明

Response

  • item
  • [GatheringPool] ギャザリングプール

Model

GatheringPool

  • gatheringPoolId
  • [string] ギャザリングプールGRN
  • createAt
  • [number] 作成日時(エポック秒)
  • description
  • [string] 説明文
  • ownerId
  • [string] オーナーID
  • updateAt
  • [number] 最終更新日時(エポック秒)
  • name
  • [string] ギャザリングプール名

Gathering

  • hostId
  • [string] ホストGRN
  • name
  • [string] ギャザリング名
  • ipAddress
  • [string] ホストIPアドレス
  • userIds
  • [table<string>] 参加可能なユーザIDリスト
  • gatheringPoolId
  • [string] 通知GRN
  • secret
  • [string] 暗号鍵
  • createAt
  • [number] 作成日時(エポック秒)
  • gatheringId
  • [string] 購読GRN
  • ownerId
  • [string] オーナーID
  • updateAt
  • [number] 最終更新日時(エポック秒)
  • port
  • [number] ホストポート