1. Go to this page and download the library: Download mirovit/ionic-platform-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mirovit / ionic-platform-sdk example snippets
default, if a token is not passed in the constructor,
// the class will try to load the token from
// IONIC_TOKEN environment variable. The second param,
// the API endpoint is set as default value to
// https://api.ionic.io/, which is the current endpoint:
$sdk = new Mirovit\IonicPlatformSDK\IonicPlatformSDK();
// or explicitly them:
$sdk = new Mirovit\IonicPlatformSDK\IonicPlatformSDK(
'ionic_api_token',
'api_endpoint'
);
// Retrieve an user
$user = $sdk
->users()
->get('user-uuid-from-ionic');
// Create an user
$newUser = $sdk
->users()
->create([
'app_id' => 'your_app_id',
'email' => '[email protected]',
'password' => 'very_secret_passw0rd',
]);