unclear documentation of data parameter to PhotonPeer.SendOperation()
Please add an example of the format for the data parameter to the documentation of PhotonPeer.SendOperation().
Current documentation:
I had to go dig through the source of photon-chat.js to figure out how to call SendOperation properly. I interpreted "key-value pairs" as { key1: value1... } or [[key1, value1],[key2, value2]...]. I would not interpret the original description as a flattened array.
Current documentation:
data object <optional> Parameters of operation as key-value pairs.Suggested documentation:
data array <optional> Parameters of operation as a flattened array of key-value pairs: [key1, value1, key2, value2...]
I had to go dig through the source of photon-chat.js to figure out how to call SendOperation properly. I interpreted "key-value pairs" as { key1: value1... } or [[key1, value1],[key2, value2]...]. I would not interpret the original description as a flattened array.
0
Comments
-
Thanks for the feedback and sorry for the hassle.
I created a fitting task for the next update of the SDK.0 -
Online documentation updated:
http://doc-api.photonengine.com/en/javascript/current/Photon.PhotonPeer.html
Thanks.0 -
The JavaScript is must be documentation as the basis of parameter. It is really wonderful to listen.0