Skip to content

ワールド (Worlds)

メソッド

GetWorld(ctx, worldId)

指定IDのワールド情報を取得します。

go
world, err := client.GetWorld(ctx, "wrld_...")

戻り値: (*shared.World, error)


SearchWorlds(ctx, opts)

ワールドを検索します。

go
worlds, err := client.SearchWorlds(ctx, shared.SearchWorldsOptions{
    Search:      "world-name",
    N:           10,
    Sort:        "popularity",
    ReleaseStatus: "public",
})

GetActiveWorlds(ctx)

現在アクティブなワールドの一覧を取得します。

go
worlds, err := client.GetActiveWorlds(ctx)

GetRecentWorlds(ctx)

最近訪問したワールドの一覧を取得します。

go
worlds, err := client.GetRecentWorlds(ctx)

GetFavoriteWorlds(ctx)

お気に入りワールドの一覧を取得します。

go
worlds, err := client.GetFavoriteWorlds(ctx)

CreateWorld(ctx, req)

新しいワールドを作成します。

go
world, err := client.CreateWorld(ctx, shared.CreateWorldRequest{
    Name:        "My World",
    Description: "My custom world",
    AssetURL:    "https://...",
})

UpdateWorld(ctx, worldId, req)

ワールド情報を更新します。

go
world, err := client.UpdateWorld(ctx, "wrld_...", shared.UpdateWorldRequest{
    Name:        "Updated World",
    Description: "Updated description",
})

DeleteWorld(ctx, worldId)

ワールドを削除します。

go
err := client.DeleteWorld(ctx, "wrld_...")

GetWorldMetadata(ctx, worldId)

ワールドのメタデータを取得します。

go
meta, err := client.GetWorldMetadata(ctx, "wrld_...")

PublishWorld(ctx, worldId) / UnpublishWorld(ctx, worldId)

ワールドを公開・非公開にします。

go
err := client.PublishWorld(ctx, "wrld_...")
err := client.UnpublishWorld(ctx, "wrld_...")

型定義

shared.World

フィールド説明
IDstringワールドID
Namestringワールド名
Descriptionstring説明
AuthorIDstring作成者ID
AuthorNamestring作成者名
Capacityint最大収容人数
Tags[]stringタグ
ReleaseStatusstring公開状態
ThumbnailImageURLstringサムネイル画像URL
Visitsint訪問数
Favoritesintお気に入り数

Released under the Apache-2.0 License.