svrooij/sonos-api-docs

parameter versus property

hklages opened this issue · 3 comments

I suggest to rename "parameter" to "property" for the methods (in table header).
Reading parameter leads to create calls ..... .SetMute(0, true, 'Master') instead of using object with the properties

What page do you mean? Url?

Documentation of Sonos-ts or the generic soap documentation?

I’m such a fan of TypeScript because then it would just not compile if you code it wrong

What page do you mean? Url?

All servcies for instance this

Documentation of Sonos-ts or the generic soap documentation?

Both but I put the issue only to sonos-api-docs.

I guess you only have to change the template.
Input --> Input as object
parameter --> property

parameter

I’m such a fan of TypeScript because then it would just not compile if you code it wrong

Believe you - unfortunately Node-RED does not support TypeScript.

This is the generic soap documentation soap, where it shows the soap body. In this case parameter is the best description I think?

And here sonos-ts is also says:

All methods that require input expect an object with the specified parameters, even if it only requires one parameter.

I totally agree that this can be made better.

How about I change Input: to Input object: and parameter to property. And last but not least also add sample code on how to call this that is just copy paste.

And by the way, you can use typescript in node-red, this sample looks interesting.