CloudVariables
The CloudVariables Service provides support for storing variables on the cloud. Variables can be optionally password-protected or stored only for the current user.
Cloud variables that are inactive (no reads or writes) for 30 days are subject to deletion.
RPCS
- CloudVariables.deleteUserVariable(name: String)
Delete the user variable for the current user.
Arguments:
name: String
(String) - Variable name
- CloudVariables.deleteVariable(name: String, password: String?)
Delete a given cloud variable
Arguments:
- CloudVariables.getUserVariable(name: String)
Get the value of a variable for the current user.
Arguments:
name: String
(String) - Variable name
Returns:
Any
(Any) - the stored value
- CloudVariables.getVariable(name: String, password: String?)
Get the value of a cloud variable
Arguments:
Returns:
Any
(Any) - the stored value
- CloudVariables.listenToUserVariable(name: String, msgType: Any, duration: Duration?)
Identical to
CloudVariables.listenToVariable()
except that it listens for updates on a user variable.Arguments:
- CloudVariables.listenToVariable(name: String, msgType: String, password: String?, duration: Duration?)
Registers your client to receive messages each time the variable value is updated.
name
andpassword
denote the variable to listen to.msgType
is the name of the message that will be sent each time it is updated.The variable must already exist prior to calling this RPC. Update events will cease when the variable is deleted.
Message Fields
name
- the name of the variable that was updatedvalue
- the new value of the variable
Arguments:
- CloudVariables.lockVariable(name: String, password: String?)
Lock a given cloud variable.
A locked variable cannot be changed by anyone other than the person who locked it. A variable cannot be locked for more than 5 seconds.
Arguments:
- CloudVariables.setUserVariable(name: String, value: Any)
Set the value of the user cloud variable for the current user.
Arguments:
- CloudVariables.setVariable(name: String, value: Any, password: String?)
Set a cloud variable. If a password is provided on creation, the variable will be password-protected.
Arguments:
- CloudVariables.unlockVariable(name: String, password: String?)
Unlock a given cloud variable.
A locked variable cannot be changed by anyone other than the person who locked it. A variable cannot be locked for more than 5 minutes.
Arguments: