Initialization and authentication
Before you can start using the datasets within your project, you will need to authenticate. In order to do this, you will need to provide your project URL and API keys that holds policies. API keys consist out of a key and a secret. Policies describe what access is provided to a dataset. You can just pass in your project URl and the API keys as described in the example below and the SDK will authenticate behind the scenes. Because you have created policies and assigned them to an API key, you don't need to worry about authorization, it's handled by the platform.
jexiaClient() function will return an instance of the
Client class. On Node.JS, you will need to provide a
fetch standard compliant function as a parameter. You will need to add a compatible dependency to your project. For development of the SDK we've used
The Module system
The Jexia SDK is built as a set of modules (or plugins) structured around a core entity (the
Client class used above). In order to use a module you need to:
- initialize it
- pass it to the
Clientwhen calling the
Probably the most useful module is the Data Operation Module (
DataOperationsModule class). The example below will show how to initialize the SDK using this module. Follow the
dataModule variable to see how this mechanism works.