1. Go to this page and download the library: Download sspat/profiru 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/ */
sspat / profiru example snippets
use GuzzleHttp\RequestOptions;
use Http\Adapter\Guzzle6\Client as GuzzleAdapter;
use sspat\ProfiRu\Client;
use sspat\ProfiRu\Constants\Domains;
// Create an instance of any PSR-18 compliant HTTP Client and pass your partnership SSL certificate and key paths
$httpClient = GuzzleAdapter::createWithConfig([
RequestOptions::TIMEOUT => 5,
RequestOptions::SSL_KEY => 'partner.key',
RequestOptions::CERT => 'partner.crt',
RequestOptions::VERIFY => false,
]);
// Create an instance of the API client, passing the HTTP client to it
$api = new Client($httpClient);
// Get Locations dictionary
$locations = $api->getLocations();
// Get Services dictionary
$services = $api->getServices();
// For requests to the pagination API an API domain must be specified
$organizations = $api->getOrganizations(Domains::HEALTHCARE);
$specialists = $api->getSpecialists(Domains::BEAUTY);