You've already forked CC-Framework.BriskGameServer
Update Unity SDK for daily space like API
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user