feat(godot): discovery API client with typed WorldSummary and DiscoveryResult parsing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user