feat(godot): discovery API client with typed WorldSummary and DiscoveryResult parsing

This commit is contained in:
2026-09-15 21:01:05 +00:00
parent f95edb6713
commit 434f776f9a
3 changed files with 227 additions and 0 deletions
+25
View File
@@ -456,6 +456,31 @@ func report_message(message_id: int, conversation_type: String, reason: String,
return await SocialApiClient.report_message(self, message_id, conversation_type, reason, context_text)
# ---------------------------------------------------------------------------
# Discovery Features
# ---------------------------------------------------------------------------
## List public worlds for discovery with optional search, tags, category, and sort.
func get_discovery_worlds(
q: String = "",
tags: Array = [],
category: String = "",
sort: String = "newest",
skip: int = 0,
limit: int = 50
) -> Dictionary:
return await DiscoveryApiClient.get_worlds(self, q, tags, category, sort, skip, limit)
## Get distinct categories of public worlds.
func get_discovery_categories() -> Dictionary:
return await DiscoveryApiClient.get_categories(self)
## Record a visit to a world.
func record_world_visit(world_id: int, anonymous_token: String = "") -> Dictionary:
return await DiscoveryApiClient.record_visit(self, world_id, anonymous_token)
# ---------------------------------------------------------------------------
# Internals