Twilio Runtime Client provides a simple and intuitive way of orchestrating the various parts of the Twilio Runtime. Using the Runtime Client, developers can access Sync to store data, reference other Functions to better organize their code, and access configuration stored in Assets.
||Array of Assets||Provides an array of Asset objects that can be used to retrieve files served on Twilio Assets.|
||Array of Functions||Provides an array of Function objects that can be used to compose code hosted on Twilio Functions.|
||Twilio Sync Service||
Sync Service instance used to manage and access data stored in Twilio Sync
The Asset object allows developers to load and reference files stored in Twilio Assets. This is deal for configuration data or minified libraries.
||String||String specifying the location of the Asset|
The Function object enables developers to compose complex applications by allowing them to include and execute code stored in multiple Functions.
||String||String specifying the location of the Function|
We’ve made it easy for you to access the Sync REST API from Functions. Use the Runtime Client to access any of Sync’s real-time data primitives and store information between Function invocations. The same data can be accessed using the Sync API library, making Sync from Functions the perfect way to update real-time apps and dashboards.
The Runtime Client provides a wrapper around the Twilio REST API Helper to make it easy to use Twilio Sync. Calling
Runtime.getSync()will return a Sync Service object that has been configured to work with your Default Sync Instance.