Home | Platform SDK

Data

These methods are accessible through env.data(), profile.data() and wallet.data() which expose a DataRepository instance.

Get a list of all data with key and value

profile.data().all();

Get a list of all data keys

profile.data().keys();

Get a list of all data values

profile.data().values();

Get the value for the given key

profile.data().get("theme");

Set the value for the given key

profile.data().set("theme", "dark");

Check if a data for the given key exists

profile.data().has("theme");

Check if a data for the given key is missing

profile.data().missing("theme");

Forget the value for the given key

profile.data().forget("theme");

Forget all data (Use with caution!)

profile.data().flush();

Take a snapshot of the current data (Use with caution!)

profile.data().snapshot();

Restore a previously taken snapshot (Use with caution!)

profile.data().restore();

2020 © ARK.io | All rights reserved | An ARK.io Product