1. Go to this page and download the library: Download irap/vida-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/ */
irap / vida-sdk example snippets
$api = new App(
$app_auth_id,
$app_api_key,
$app_private_key
);
/* The response body i.e. the results
* that are returned
*/
$response->response;
/* The HTTP Response code,
* e.g. 200 for success,
* 401 for unauthorized
*/
$response->code;
/* Status of the response:
* Success or Error
*/
$response->status;
/* The error message, if status == 'Error'
*/
$response->error;
$response->status = 'Error';
$response->code = 401;
$response->error = 'Authentication failure - You do not have permission to access this resource';
# Create the first filter for the first admins that were put into the system
$filter1 = new iRAP\VidaSDK\Filter('id', 10, '<=');
$filter1->addFilter('is_admin', 1);
# Create second filter for newer users that are not admins.
$filter2 = new iRAP\VidaSDK\Filter('id', 1000, '>');
$filter2->addFilter('is_admin', 1, '!=');
# Group the filters together
$filter = new iRAP\VidaSDK\FilterGroup(iRAP\VidaSDK\Conjunction::createOr(), $filter1, $filter2);
$result = $api->getUsers(null, $filter);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.