User Manual

アプリ - Download app

ルートURL

POST https://playcanvas.com/api/apps/download

説明

自分のサーバーでセルフホストすることができるアプリをダウンロードできます。リクエストによりエクスポートジョブが開始され、ジョブの詳細がレスポンスで返されます。idを指定してジョブをポールして、そのステータスが「完了」または「エラー」になるまで待ちます。ジョブが完了すると、そのデータにはエクスポートされたアプリをダウンロードするためのURLが含まれます。

curl -H "Authorization: Bearer fdslkjlk32j2l3kj2lkj2lkj323rr" -H "Content-Type: application/json" -X POST -d '{"project_id": 9999999, "scenes": [9999999], "name": "My App"}' "https://playcanvas.com/api/apps/download"

パラメーター

project_id

プロジェクトのID。

name

アプリの名前。1000文字未満でなければなりません。

scenes

アプリに含めるシーンIDの一覧。シーンを指定する場合、最初のシーンがアプリケーションの初期シーンとして使用されます。

branch_id [オプション]

ブランチのID。IDが指定されていない場合は、メインブランチが使用されます。

description [オプション]

アプリの説明。10,000文字未満でなければなりません。

version [オプション]

アプリのバージョン。20文字までの文字列が使用できます。

release_notes [オプション]

アプリのリリースノート。10,000文字未満の文字列が使用できます。

scripts_concatenate [オプション]

ブール値。スクリプトを連結する場合はtrueに設定します。

scripts_minify [オプション]

ブール値。スクリプトを圧縮する場合はtrueに設定します。デフォルトはtrueです。

scripts_sourcemaps [オプション]

ブール値。スクリプトのソースマップを生成する場合はtrueに設定します。デフォルトはfalseです。

optimize_scene_format [オプション]

ブール値。シーンを最適化された形式で表示する場合はtrueに設定します(詳細はシーン形式の最適化を参照)。

engine_version [オプション]

文字列。アプリ用に特定のバージョンが必要な場合はエンジンバージョンの文字列(全リリースのリスト)を設定します。

レスポンススキーマ

ステータス:201 Created
{
    "status": "running" | "complete" | "error",
    "messages": list of strings,
    "created_at": date,
    "modified_at": date,
    "data": {
        "concatenate": boolean,
        "branch_id": string,
        "optimize_scene_format": boolean,
        "minify": boolean,
        "name": string,
        "sourcemaps": boolean,
        "scenes": list of int scene ids,
        "engineVersion": string,
        "preload_bundle": boolean,
        "project_id": int,
        "owner_id": int
    },
    "id": int
}

エラー

401

Unauthorized

403

Forbidden

404

Project not found

404

Owner not found

404

Scene not found

429

Too many requests

レート制限

このルートはstrictなレート制限を使用します。

This site is translated by the community. If you want to get involved visit this page