Skip to content

Commit

Permalink
API documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
EvolutionPHP committed Jan 26, 2021
1 parent 3e27b80 commit ec964f3
Showing 1 changed file with 47 additions and 19 deletions.
66 changes: 47 additions & 19 deletions docs/api_doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,53 @@ Users list

**Example request**:

.. sourcecode:: php

<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://helpdeskz.web/api/users',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Token: <token>'
),
));
$response = curl_exec($curl);
curl_close($curl);
.. content-tabs::

.. tab-container:: tab1
:title: CURL

.. sourcecode:: php

<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://helpdeskz.web/api/users',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Token: <token>'
),
));
$response = curl_exec($curl);
curl_close($curl);

.. tab-container:: tab2
:title: PHP

.. sourcecode:: php

<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://helpdeskz.web/api/users',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Token: <token>'
),
));
$response = curl_exec($curl);
curl_close($curl);

**Example response**:

Expand Down

0 comments on commit ec964f3

Please sign in to comment.