Idea

dragonfoundry avatar image
dragonfoundry suggested

UpdatePlayerStatistics vs GetPlayerStatistics (server)

These two calls get and return differently-named, but functionally identical objects. Any chance we can get them lined up, so we can just store the object, rather than having to manipulate it into a third data type for storage & usage?

(also, the fact that they return a list of objects rather than a dictionary makes it harder to parse for a specific result, but that's not a big deal)

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

3 Comments

·
brendan avatar image
brendan commented

So, to rephrase, are you asking for UpdatePlayerStatistics to take an array of StatisticValue objects, so that it's taking the same object type that the Get call returns (because they both contain StatisticName, Value, and Version)?

I'm moving this to the Feature Requests area, so that others have the opportunity to vote on this, and let us know if it's important to their titles.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

dragonfoundry avatar image
dragonfoundry commented

Yes. There's other similar issues:

  • The Server and Client APIs often return identical, or near-identical objects, which aren't interchangeable (we can't GetUserInventroy on the server, then pass that to the client).
  • GetUserInventory and GrantItemsToUser generate almost-identical data objects. It's not possible to update an inventory cache with the result from GrantItemsToUser (returns GrantedItemInstance)... but it is possible to do so with items granted by UnlockContainer (Returns ItemInstance)

My guess is that changing any of these would be a breaking change, of course...

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan commented

Thanks, that's a great write-up. And yes, this would likely be a breaking change, so if the feedback from our community is that this is an important change to make, we would likely approach it by using new API calls, so that the existing ones would continue to work as-is.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write a Comment

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.

Related Ideas