GS2-Account

Create Client

account_client = client('account')

Method

authentication

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

認証処理を行います

  • 消費クオータ: 3

Request

{
  gameName=string,
  userId=string,
  password=string,
  keyName=string,
}
  • gameName
  • [string] ゲームの名前を指定します。
  • userId
  • [string] 認証する対象アカウントのユーザIDを指定します。
  • password
  • [string] 認証に利用するパスワード
  • keyName
  • [string] 認証結果の暗号化に利用する GS2-Key の暗号鍵名

Response

  • token
  • [string] アクセストークン

create_account

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

アカウントを登録します

  • 消費クオータ: 10

Request

{
  gameName=string,
}
  • gameName
  • [string] ゲームの名前を指定します。

Response

  • item
  • [Account] 引き継ぎ情報

create_game

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

ゲームを新規作成します

Request

{
  changePasswordIfTakeOver=boolean,
  serviceClass=string,
  name=string,
  description=string,
}
  • changePasswordIfTakeOver
  • [boolean] 引き継ぎ時にアカウントのパスワードを変更するか
  • serviceClass
  • [string] ゲームのサービスクラス
  • name
  • [string] ゲームの名前
  • description
  • [string] ゲームの説明

Response

  • item
  • [Game] ゲーム

create_take_over

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

引き継ぎ情報を登録します

  • 消費クオータ: 10

Request

{
  gameName=string,
  password=string,
  type=number,
  userIdentifier=string,
  accessToken=string
}
  • gameName
  • [string] ゲームの名前を指定します。
  • password
  • [string] 引き継ぎ時に利用するパスワード
  • type
  • [number] 引き継ぎ情報の種類を表す数値
  • userIdentifier
  • [string] 引き継ぎに使用するユーザ固有のID
  • accessToken
  • [string] GS2-Auth で発行を受けたアクセストークン

Response

  • item
  • [TakeOver] 引き継ぎ情報

delete_account

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

アカウントを削除します

  • 消費クオータ: 10

Request

{
  gameName=string,
  userId=string,
}
  • gameName
  • [string] ゲームの名前を指定します。
  • userId
  • [string] 削除する対象アカウントのユーザIDを指定します。

Response

None

delete_game

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

ゲームを削除します

Request

{
  gameName=string,
}
  • gameName
  • [string] ゲームの名前を指定します。

Response

None

delete_take_over

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

引き継ぎ情報を削除します

  • 消費クオータ: 10

Request

{
  gameName=string,
  type=number,
  userIdentifier=string,
  accessToken=string
}
  • gameName
  • [string] ゲームの名前を指定します。
  • type
  • [number] 削除する引き継ぎ情報の種類を指定します。
  • userIdentifier
  • [string] 削除する引き継ぎ情報のユーザ固有IDを指定します。
  • accessToken
  • [string] GS2-Auth で発行を受けたアクセストークン

Response

None

describe_account

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

アカウントを取得します

  • 消費クオータ: 50件あたり5

Request

{
  gameName=string,
  pageToken=string,
  limit=number,
}
  • gameName
  • [string] ゲームの名前を指定します。
  • pageToken
  • [string] データの取得を開始する位置を指定するトークン
  • limit
  • [number] データの取得件数

Response

  • nextPageToken
  • [string] 次のページを読み込むためのトークン
  • items
  • [table<Account>] 引き継ぎ情報

describe_game

response = account_client:describe_game(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<Game>] ゲーム

describe_service_class

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

サービスクラスの一覧を取得します

Request

{
}

Response

  • items
  • [table<string>] サービスクラス一覧

describe_take_over

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

引き継ぎ情報を取得します

  • 消費クオータ: 50件あたり5

Request

{
  gameName=string,
  pageToken=string,
  limit=number,
  accessToken=string
}
  • gameName
  • [string] ゲームの名前を指定します。
  • pageToken
  • [string] データの取得を開始する位置を指定するトークン
  • limit
  • [number] データの取得件数
  • accessToken
  • [string] GS2-Auth で発行を受けたアクセストークン

Response

  • nextPageToken
  • [string] 次のページを読み込むためのトークン
  • items
  • [table<TakeOver>] 引き継ぎ情報

do_take_over

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

引き継ぎを実行します

  • 消費クオータ: 10

Request

{
  gameName=string,
  type=number,
  password=string,
  userIdentifier=string,
}
  • gameName
  • [string] ゲームの名前を指定します。
  • type
  • [number] 引き継ぎ情報の種類を指定します。
  • password
  • [string] 引き継ぎ設定に指定されたパスワード
  • userIdentifier
  • [string] 引き継ぎ情報のユーザ固有ID

Response

  • item
  • [Account] 引き継ぎ情報

get_game

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

ゲームを取得します

Request

{
  gameName=string,
}
  • gameName
  • [string] ゲームの名前を指定します。

Response

  • item
  • [Game] ゲーム

get_game_status

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

ゲームのステータスを取得します

Request

{
  gameName=string,
}
  • gameName
  • [string] ゲームの名前を指定します。

Response

  • status
  • [string] ステータス

get_take_over

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

引き継ぎ情報を取得します

  • 消費クオータ: 5

Request

{
  gameName=string,
  type=number,
  userIdentifier=string,
  accessToken=string
}
  • gameName
  • [string] ゲームの名前を指定します。
  • type
  • [number] 取得する引き継ぎ情報の種類を指定します。
  • userIdentifier
  • [string] 取得する引き継ぎ情報のユーザ固有IDを指定します。
  • accessToken
  • [string] GS2-Auth で発行を受けたアクセストークン

Response

  • item
  • [TakeOver] 引き継ぎ情報

update_game

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

ゲームを更新します

Request

{
  gameName=string,
  changePasswordIfTakeOver=boolean,
  serviceClass=string,
  description=string,
}
  • gameName
  • [string] ゲームの名前を指定します。
  • changePasswordIfTakeOver
  • [boolean] 引き継ぎ時にアカウントのパスワードを変更するか
  • serviceClass
  • [string] ゲームのサービスクラス
  • description
  • [string] ゲームの説明

Response

  • item
  • [Game] ゲーム

update_take_over

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

引き継ぎ情報を更新します

  • 消費クオータ: 10

Request

{
  gameName=string,
  type=number,
  userIdentifier=string,
  password=string,
  oldPassword=string,
  accessToken=string
}
  • gameName
  • [string] ゲームの名前を指定します。
  • type
  • [number] 更新する引き継ぎ情報の種類を指定します。
  • userIdentifier
  • [string] 更新する引き継ぎ情報のユーザ固有IDを指定します。
  • password
  • [string] 引き継ぎ時に利用する新しいパスワード
  • oldPassword
  • [string] 引き継ぎ時に利用する現在設定されているパスワード
  • accessToken
  • [string] GS2-Auth で発行を受けたアクセストークン

Response

  • item
  • [TakeOver] 引き継ぎ情報

Model

Game

  • gameId
  • [string] ゲームGRN
  • name
  • [string] ゲーム名
  • serviceClass
  • [string] サービスクラス
  • createAt
  • [number] 作成日時(エポック秒)
  • ownerId
  • [string] オーナーID
  • changePasswordIfTakeOver
  • [boolean] アカウント引き継ぎ時にパスワードを変更するか
  • updateAt
  • [number] 最終更新日時(エポック秒)
  • description
  • [string] 説明文

TakeOver

  • userId
  • [string] ユーザID
  • createAt
  • [number] 作成日時(エポック秒)
  • type
  • [number] アカウント種別
  • userIdentifier
  • [string] ユーザ識別子

Account

  • password
  • [string] パスワード
  • userId
  • [string] ユーザID
  • createAt
  • [number] 作成日時(エポック秒)