Update Unity SDK for daily space like API

This commit is contained in:
2026-04-21 16:02:06 +08:00
parent a257a8a912
commit 0e5cab4f27
16 changed files with 154 additions and 34 deletions

View File

@@ -64,6 +64,11 @@ await Brisk.Space.UpdateMyAsync(new
var mySpace = await Brisk.Space.GetByPlayerIdAsync(Brisk.PlayerId);
var myContent = await Brisk.Space.DownloadContentByPlayerIdAsync(Brisk.PlayerId);
var text = Encoding.UTF8.GetString(myContent.Bytes);
var likeResult = await Brisk.Space.LikeByPlayerIdAsync("target-player-id");
Debug.Log($"total={likeResult.LikeCount}, today={likeResult.TodayLikeCount}, created={likeResult.Created}");
var todayLikes = await Brisk.Space.GetLikesByPlayerIdAsync(Brisk.PlayerId, 20, true);
```
Notes:
@@ -72,6 +77,10 @@ Notes:
- `GetByPlayerIdAsync(...)` returns metadata only
- use `DownloadContentByPlayerIdAsync(...)` to read the actual content bytes
- `UpdateMyAsync(...)` automatically picks text / binary / json behavior from the payload type
- space likes are now tracked by natural day in `Asia/Shanghai`
- `BriskSpaceView` / `BriskSpaceStats` include both `LikeCount` and `TodayLikeCount`
- `BriskSpaceView` also includes `LikedByMe` and `LikeResetAt`
- `GetLikesByPlayerIdAsync(..., currentCycleOnly: true)` returns current-cycle likes only
## Sample