Open allister-beamable opened 5 months ago
There was work done previously on the client side to upgraded the auto-gen stats api to handle the polymorphic stats api, https://github.com/beamable/BeamableProduct/pull/2884/files#diff-515fa944d4cf55d19051a23bc26cfddc1fe9fbdbe6aa3c5dbeea4f3c94c6b274
but it was never merged. However, it may have insight for how to do this on the C#MS side.
If we support this in one place, we should support it in all known stat-sdk places (unity sdk, cli, and C#MS)
Peter and Ali discussed- but this would likely need a scala backend change?
This would be considerably easier if the backend offered separate per-type endpoints instead of a single, polymorphic endpoint. https://disruptorbeam.atlassian.net/browse/PLAT-5495
If we don't wait for a backend fix, we'll adopt the responsibility to own this complex feature on every client; which is inefficient from an engineering perspective. We'll wait for the proper APIs to be in place, and implement against those when they arrive.
Is your feature request related to a problem? Please describe.
The Beamable API for Stats supports incrementing and decrementing player stats via the
add
field. However, the current C#MS implementation only supports using theset
field which overwrites stats.Describe the solution you'd like
Either update existing
IMicroserviceStatsApi
methods or create new ones to support doing incremental stat operations ongame.private.player
stats.Describe alternatives you've considered
This can be worked around by using
Requester
to hit the stats API directly, but it would be slicker to have the functionality built into the SDK to get the benefit of intellisense and other conveniences.