Refactor API response descriptors to use resource classes
Build Plugin / build (push) Has been cancelled
Build Plugin / release (push) Has been cancelled

- Updated response descriptors in various endpoints to utilize specific resource classes instead of generic JsonResponse.
- Changed response types for friendship, guild, party, and support issue endpoints to their respective resource classes.
- Incremented version number in manifest.json to 0.5.3 for the new changes.
This commit is contained in:
2026-06-05 09:23:01 -07:00
parent 59330bdf84
commit be35d92b52
57 changed files with 342 additions and 62 deletions
+25 -2
View File
@@ -14,6 +14,7 @@ client.presence(); // PresenceClient
client.players(); // PlayersClient
client.batch(); // BatchClient
client.cache(); // ApiDataCacheClient
client.reactivePlayerCache(); // ReactivePlayerCacheHooks
```
## Handwritten Domain Clients
@@ -35,10 +36,32 @@ client.presence().shutdown(instanceId, "restart");
`PlayersClient`
```java
PlayerSessionProfile profile = client.players().getSessionProfile(playerId);
List<PlayerEntitlement> entitlements = client.players().getEntitlements(playerId);
PlayerSessionProfile profile = client.players().sessionProfile(playerId);
List<PlayerEntitlement> entitlements = client.players().entitlementsIndex(playerId);
```
`AssetsClient`
```java
AssetPackVersion active = client.assets().getActivePack(packKey);
List<AssetPackVersionFile> files = client.assets().getPackVersionFiles(active.id());
```
## Reactive Player Cache
`reactivePlayerCache()` is intended for Hytale ECS/event handlers that know player state changed and need cache freshness now, not after a TTL expires.
```java
PlayerCacheContext context = new PlayerCacheContext(playerId, playerRef, entityStore);
client.reactivePlayerCache().onPlayerJoin(context);
client.reactivePlayerCache().onPermissionChanged(context);
client.reactivePlayerCache().onSanctionChanged(context);
client.reactivePlayerCache().onNotificationCreated(context);
```
These hooks invalidate and prewarm the player-scoped cache entries for permission snapshots, moderation sanction snapshots, and notifications.
## Error Handling
Transport errors use checked `ControlPlaneException` subclasses: