User API guide/uk: Difference between revisions

Created page with "Отже, перше, що ви повинні відобразити, це список послуг та список співробітників. Отримайте ці дані за допомогою методів getEventList та getUnitList. Обидва вони повертають список з повною інформацією про кожен елемент, що міститься в ньому, тому у вас є багато можливост..."
Tags: Mobile edit Mobile web edit
Created page with "'''Приклад коду для отримання списку послуг''' <br><br> <nowiki>$services = $client->getEventList(); // повертає масив (array( // 'id' => 1, - ідентифікатор послуги // 'name' => 'Service 1', - назва послуги // 'description' => 'Опишіть свою послугу...', - опис послуги // 'duration' => 60, - тривалість послуги //..."
Line 120: Line 120:




<div lang="en" dir="ltr" class="mw-content-ltr">
'''Приклад коду для отримання списку послуг'''
'''Code example of getting services list'''
<br><br>
<br><br>
  <nowiki>$services = $client->getEventList();
  <nowiki>$services = $client-&gt;getEventList();
// returns array(array(
// повертає масив (array(
//    'id' => 1, - service id
//    'id' =&gt; 1, - ідентифікатор послуги
//    'name' => 'Service 1', - service's name
//    'name' =&gt; 'Service 1', - назва послуги
//    'description' => 'Describe your service...', - service description
//    'description' =&gt; 'Опишіть свою послугу...', - опис послуги
//    'duration' => 60, - service duration
//    'duration' =&gt; 60, - тривалість послуги
//    'hide_duration' => 0, - Hide duration to clients flag,
//    'hide_duration' =&gt; 0, - прапорець приховування тривалості від клієнтів,
//    'picture' => null, - file name of picture or null
//    'picture' =&gt; null, - ім'я файлу зображення або null
//    'picture_path' => '/uploads/apidemo/event__picture/small/', - full path to picture,
//    'picture_path' =&gt; '/uploads/apidemo/event__picture/small/', - повний шлях до зображення,
//    'position' => 1 - service position
//    'position' =&gt; 1 - позиція послуги
//    'is_active' => 1, - the service is activated
//    'is_active' =&gt; 1, - послуга активована
//    'is_public' => 1, - the service is allowed to book by clients
//    'is_public' =&gt; 1, - послуга доступна для бронювання клієнтами
// ), ...)</nowiki>
// ), ...)</nowiki>
<br><br>
<br><br>
'''Code example of getting service performers list'''
'''Приклад коду для отримання списку виконавців послуг'''
<br><br>
<br><br>
  <nowiki>$services = $client->getUnitList();
  <nowiki>$services = $client-&gt;getUnitList();
// returns array(array(
// повертає масив(array(
//    'id' => 1, - performer id
//    'id' =&gt; 1, - ідентифікатор виконавця
//    'name' => 'Provider 1', - performer name
//    'name' =&gt; 'Provider 1', - ім'я виконавця
//    'phone' => '111111111', - perfomer phone number
//    'phone' =&gt; '111111111', - номер телефону виконавця
//    'description' => 'Describe your performer...', - performer description
//    'description' =&gt; 'Опишіть свого виконавця...', - опис виконавця
//    'email' => 'test@gmail.com', - perfomer email,
//    'email' =&gt; 'test@gmail.com', - електронна адреса виконавця,
//    'is_active' => 1, - the performer is activated
//    'is_active' =&gt; 1, - виконавець активований
//    'is_visible' => 1, - the perfomer is visible for clients,
//    'is_visible' =&gt; 1, - виконавець видимий для клієнтів,
//    'picture' => null, - file name of picture or null,
//    'picture' =&gt; null, - ім'я файлу зображення або null,
//    'picure_path' => '/uploads/apidemo/unit_group__picture/small/', - full path to picture
//    'picure_path' =&gt; '/uploads/apidemo/unit_group__picture/small/', - повний шлях до зображення
//    'position' => 1, - performer position
//    'position' =&gt; 1, - позиція виконавця
//    'qty' => 1, performer quantity
//    'qty' =&gt; 1, кількість виконавців
// ), ...)</nowiki>
// ), ...)</nowiki>
<br><be>
<br><be>
</div>