User Data

Platform Supported
Crazy Games ✔️
Yandex Games ✔️
Poki ❌
VK ✔️

Setting data:

var data:Dictionary = {"Key": "Value"}
WebBus.set_data(data)

Getting data:

var result = await WebBus.get_data("Key") # One key
print(result) # {"Key": "Value"}

var result = await WebBus.get_data(["Key1", "Key2"]) # Several keys
print(result) # {"Key1": "Value1", "Key2": "Value2"}

Note

For CrazyGames and VK, the functions set_stats() and get_stats() are identical to the functions set_data() and get_data(), respectively.

Setting stats:

var data:Dictionary = {"Key": 12345}
WebBus.set_stats(data)

Getting stats:

var result = await WebBus.get_stats("Key") # One key
print(result) # {"Key": 1234.5}

var result = await WebBus.get_stats(["Key1", "Key2"]) # Several keys
print(result) # {"Key1": 1234.5, "Key2": 5432.1}