And start connecting the client in your JS application:
// Configure Parallelixconstclient=newParallelix({baseModulesPath:"/libraries/",// Where your modules locatedsupportedPlatforms: ["vk","telegram"],// Modules to initializevk:{},// VK Module Config Exampletelegram:{}// Telegram Module Config Example});// Add Error and Initialization Handlerclient.OnError=(error)=>{};client.OnInitialized=(data)=>{ // Work with Parallelix Here};// Initialize Clientclient.Initialize();
Make sure that parallelix.****.js modules are located on the same relative path that you set in the Parallelix object configuration.
Done. We've got the basic connection sorted out. If you want to learn more about configuration options - visit our section in API Reference
Connect your Modules and Usage
Modules are connected automatically when you specify their name in the Parallelix object configuration. The module name is also contained in the script (parallelix.MODULE_NAME.js).
If you don't need a particular module, you can simply remove it from the configuration.
All modules automatically detect for your application which platform Parallelix is currently running on. Thus, our library automatically switches between them, and all you need to do is to use the Unified API
Once connected and initialized, you are notified that the client is ready for use. This is how you can start using it:
Working with Platform-Specific Libraries
You can also plug in platform-specific scripts, for example, using two different ad networks or analytics systems on different platforms.
To do this, specify these libraries and the platform on which they should be connected in the Parallelix client configuration: