PHP code example of pecherskiy-v / docdochelpers

1. Go to this page and download the library: Download pecherskiy-v/docdochelpers 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/ */

    

pecherskiy-v / docdochelpers example snippets


use Pecherskiy\DocDoc\Client;
use Pecherskiy\DocDoc\Requests\Doctors;

$client = new Client(DOCDOC_LOGIN, DOCDOC_PASSWORD, API_URL = Constants::MOCK_SERVER);
$doctorsRequest = new Doctors($client);
$doctorsRequest->city = 1;
$doctorsRequest->count = 10;
$doctorsRequest->start = 0;
$doctors = $doctorsRequest->all();

foreach($doctors as $doctor) {
    // do something
}

    $client = new Client($this->docdoc['login'], $this->docdoc['password'], Constants::MOCK_SERVER);
    $clinics = new Clinics($client);
    $clinics->start = 0;
    $clinics->count = 1;
    $clinics->city = 1;
    $result = $clinics->getClinics();