RemoteConfig class

Firebase RemoteConfig サービス インターフェース。

署名:

export declare class RemoteConfig 

プロパティ

プロパティ 修飾キー 説明
アプリ アプリ

方法

メソッド 修飾キー 説明
createTemplateFromJSON(json) では、 JSON 文字列から新しい Remote Config テンプレートを作成して返します。
getServerTemplate(options) ServerTemplate をインスタンス化し、プロジェクトの最新のテンプレート バージョンを取得してキャッシュに保存します。
getTemplate() プロジェクトの RemoteConfigTemplate の現在アクティブなバージョンを取得します。
getTemplateAtVersion(versionNumber) プロジェクトの RemoteConfigTemplate のリクエストされたバージョンを取得します。
initServerTemplate(options) ServerTemplate を同期的にインスタンス化します。
listVersions(options) 公開されている Remote Config テンプレート バージョンのリストを新しい順に並べ替えます。最新の 300 個のバージョンのみが保存されます。アクティブでない Remote Config テンプレートに対応するすべてのバージョン(つまり、クライアントが取得しているテンプレートを除くすべてのバージョン)も、90 日を経過すると削除されます。
publishTemplate(テンプレート, オプション) Remote Config テンプレートを公開します。
rollback(versionNumber) プロジェクトの公開 Remote Config テンプレートを指定のバージョンにロールバックします。ロールバックは、以前に公開された Remote Config テンプレートを取得し、強制更新を使用して再公開するのと同じです。
validateTemplate(template) RemoteConfigTemplate を検証します。

RemoteConfig.app

署名:

readonly app: App;

RemoteConfig.createTemplateFromJSON()

JSON 文字列から新しい Remote Config テンプレートを作成して返します。

署名:

createTemplateFromJSON(json: string): RemoteConfigTemplate;

パラメータ

パラメータ 説明
json 文字列 Remote Config テンプレートに入力する JSON 文字列。

戻り値:

RemoteConfigTemplate

新しいテンプレート インスタンス。

RemoteConfig.getServerTemplate()

ServerTemplate をインスタンス化し、プロジェクトの最新のテンプレート バージョンを取得してキャッシュに保存します。

署名:

getServerTemplate(options?: GetServerTemplateOptions): Promise<ServerTemplate>;

パラメータ

パラメータ 説明
オプション GetServerTemplateOptions

戻り値:

Promise<ServerTemplate>

RemoteConfig.getTemplate()

プロジェクトの RemoteConfigTemplate の現在アクティブなバージョンを取得します。

署名:

getTemplate(): Promise<RemoteConfigTemplate>;

戻り値:

Promise<RemoteConfigTemplate>

RemoteConfigTemplate で履行される Promise。

RemoteConfig.getTemplateAtVersion()

プロジェクトの RemoteConfigTemplate のリクエストされたバージョンを取得します。

署名:

getTemplateAtVersion(versionNumber: number | string): Promise<RemoteConfigTemplate>;

パラメータ

パラメータ 説明
バージョン番号 数値 | 文字列 検索する Remote Config テンプレートのバージョン番号。

戻り値:

Promise<RemoteConfigTemplate>

RemoteConfigTemplate で履行される Promise。

RemoteConfig.initServerTemplate()

ServerTemplate を同期的にインスタンス化します。

署名:

initServerTemplate(options?: InitServerTemplateOptions): ServerTemplate;

パラメータ

パラメータ 説明
オプション InitServerTemplateOptions

戻り値:

ServerTemplate

RemoteConfig.listVersions()

公開されている Remote Config テンプレート バージョンのリストを新しい順に並べ替えます。最新の 300 個のバージョンのみが保存されます。アクティブでない Remote Config テンプレートに対応するすべてのバージョン(つまり、クライアントが取得しているテンプレートを除くすべてのバージョン)も、90 日を経過すると削除されます。

署名:

listVersions(options?: ListVersionsOptions): Promise<ListVersionsResult>;

パラメータ

パラメータ 説明
オプション ListVersionsOptions バージョンのリストを取得するためのオプション オブジェクト。

戻り値:

PromiseListVersionsResult>

ListVersionsResult で履行される Promise。

RemoteConfig.publishTemplate()

Remote Config テンプレートを公開します。

署名:

publishTemplate(template: RemoteConfigTemplate, options?: {
        force: boolean;
    }): Promise<RemoteConfigTemplate>;

パラメータ

パラメータ 説明
テンプレート RemoteConfigTemplate 公開する Remote Config テンプレート。
オプション { force: ブール値; } Remote Config テンプレートを公開する際のオプション オブジェクト: force: これを true に設定すると、Remote Config テンプレートが強制的に更新され、ETag が回避されます。複数のクライアントが Remote Config テンプレートを更新している場合、Remote Config テンプレートの更新が失われる危険性があるため、この方法はおすすめしません。ETag の使用と強制更新をご覧ください。

戻り値:

Promise<RemoteConfigTemplate>

公開された RemoteConfigTemplate で履行される Promise。

RemoteConfig.rollback()

プロジェクトの公開 Remote Config テンプレートを指定のバージョンにロールバックします。ロールバックは、以前に公開された Remote Config テンプレートを取得し、強制更新を使用して再公開するのと同じです。

署名:

rollback(versionNumber: number | string): Promise<RemoteConfigTemplate>;

パラメータ

パラメータ 説明
バージョン番号 数値 | 文字列 ロールバックする Remote Config テンプレートのバージョン番号。指定したバージョン番号は、現在のバージョン番号よりも小さくなければならず、未更新が原因で削除されていないものでなければなりません。最新の 300 個のバージョンのみが保存されます。アクティブでない Remote Config テンプレートに対応するすべてのバージョン(つまり、クライアントが取得しているテンプレートを除くすべてのバージョン)も、作成後 90 日を経過すると削除されます。

戻り値:

Promise<RemoteConfigTemplate>

公開された RemoteConfigTemplate で履行される Promise。

RemoteConfig.validateTemplate()

RemoteConfigTemplate を検証します。

署名:

validateTemplate(template: RemoteConfigTemplate): Promise<RemoteConfigTemplate>;

パラメータ

パラメータ 説明
テンプレート RemoteConfigTemplate 検証する Remote Config テンプレート。

戻り値:

Promise<RemoteConfigTemplate>

検証済みの RemoteConfigTemplate で解決される Promise。