How do I update the room properties

0 votes

Hi,

 

I really have a hard time understanding the instructions for the Javascript. I want to update the room properties and I do not know how to call the method.

In the method

updateRoomProperties(roomID, tableProperties, removeArray); 

 

roomID is a string,

but what is the tableProperties? It should have the json format, but is it a string or a JSON object?

If I do not want to remove any property, what should I set the value of removeArray to? empty string or null?

 

Thank you

asked Jul 25 in JavaScript by info (16 points)

2 Answers

0 votes
No one? Not even the developers of this Framework?

Is anyone using the Javascript framework or am I the only guy who is using it?
answered Jul 27 by info (16 points)
0 votes

Hi,

Apologies for the delayed response.

You can update room properties as follows:

var tableProperties = {
     "roomType": "Private",
     "loc": "IN"
}
var removeArray = null;
AppWarp.WarpClient.getInstance().updateRoomProperties(roomId, tableProperties, removeArray);  

removeArray is an JSON Array in case you have to use this parameter or you can pass null.

Please let me know in case of any further query, I will be happy to help you.

Thanks.

 

answered Jul 30 by rajeev.etc (1,640 points)
Hi,

I had the impression that replying to the email will also post it here. I was wrong.

The tableProperties variable is a JSON property or a string? Namely, did you use the JSON.parse() method? I think that I need to use it, because I did use it in the method that creates a room.

Thank you
Could you share the code you are using to create a room?
Here is the code:

var obj = JSON.parse(myJSON);
warpclient.updateRoomProperties(roomID, obj, null);

Where myJSON is a string, i.e. {"roomType": "Private","loc": "IN"}
It does not matter how you are creating the properties parameter. It will work if it is a JSON Object. From your code, you are creating a JSON object from JSON string using parse method which is fine and will work.
This is the information that is missing from your site, e.g that it has to be a JSON object and not a JSON string. What about the removeArray? Is it an array of JSON objects or JSON strings?
Yes, you are right, we will update the doc accordingly. Remove array is an array of strings.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...