|
| __construct ($url, Authentication $auth=null) |
|
| setAuth (Authentication $auth) |
|
| request ($method, $endpoint, array $options=[]) |
|
| post ($endpoint, $body, $query_params=[]) |
|
| patch ($endpoint, $body, $query_params=[]) |
|
| put ($endpoint, $body, $query_params=[]) |
|
| get ($endpoint, $query_params=[]) |
|
| delete ($endpoint, $query_params=[]) |
|
| model ($model_name) |
|
| calendar () |
|
| files () |
|
| me () |
|
| serverKey () |
|
| serverVersion () |
|
|
| $url |
|
| $auth |
|
| $_calendar |
|
| $_files |
|
OneCRM\APIClient\Client::__construct |
( |
|
$url, |
|
|
Authentication |
$auth = null |
|
) |
| |
OneCRM\APIClient\Client::calendar |
( |
| ) |
|
Creates an instanse of Calendar class to work with events data.
- Returns
- Instance of Calendar
OneCRM\APIClient\Client::delete |
( |
|
$endpoint, |
|
|
|
$query_params = [] |
|
) |
| |
Sends a DELETE request to API
- Parameters
-
$endpoint | API endpoint, relative to API URL (ex. /data/Account) |
$query | Array with query params appended to the URL ( ex. ['offset' => 20]) |
- Returns
- Decoded response from API
- Exceptions
-
OneCRM\APIClient\Client::files |
( |
| ) |
|
Creates an instanse of Files class to upload and download files.
- Returns
- Instance of Files
OneCRM\APIClient\Client::get |
( |
|
$endpoint, |
|
|
|
$query_params = [] |
|
) |
| |
Sends a GET request to API
- Parameters
-
$endpoint | API endpoint, relative to API URL (ex. /data/Account) |
$query | Array with query params appended to the URL ( ex. ['offset' => 20]) |
- Returns
- Decoded response from API
- Exceptions
-
OneCRM\APIClient\Client::me |
( |
| ) |
|
Returns information about authenticated user
OneCRM\APIClient\Client::model |
( |
|
$model_name | ) |
|
Creates an instanse of Model class to work with data stored in 1CRM database.
- Parameters
-
$model_name | Model name, ex. Account |
- Returns
- Instance of Model
OneCRM\APIClient\Client::patch |
( |
|
$endpoint, |
|
|
|
$body, |
|
|
|
$query_params = [] |
|
) |
| |
Sends a PATCH request to API
- Parameters
-
$endpoint | API endpoint, relative to API URL (ex. /data/Account/1234) |
$body | Request body. Must be an array, it will be json-encoded |
$query | Array with query params appended to the URL ( ex. ['offset' => 20]). Normally, this is not used |
- Returns
- Decoded response from API
- Exceptions
-
OneCRM\APIClient\Client::post |
( |
|
$endpoint, |
|
|
|
$body, |
|
|
|
$query_params = [] |
|
) |
| |
Sends a POST request to API
- Parameters
-
$endpoint | API endpoint, relative to API URL (ex. /data/Account) |
$body | Request body. Must be an array, it will be json-encoded |
$query | Array with query params appended to the URL ( ex. ['offset' => 20]). Normally, this is not used |
- Returns
- Decoded response from API
- Exceptions
-
OneCRM\APIClient\Client::put |
( |
|
$endpoint, |
|
|
|
$body, |
|
|
|
$query_params = [] |
|
) |
| |
Sends a PUT request to API
- Parameters
-
$endpoint | API endpoint, relative to API URL |
$body | Request body. Must be an array, it will be json-encoded |
$query | Array with query params appended to the URL ( ex. ['offset' => 20]). Normally, this is not used |
- Returns
- Decoded response from API
- Exceptions
-
OneCRM\APIClient\Client::request |
( |
|
$method, |
|
|
|
$endpoint, |
|
|
array |
$options = [] |
|
) |
| |
Sends a request to API
This method is used to send an arbitrary request to 1CRM REST API.
- Parameters
-
$method | HTTP request method (GET, PUT, POST, etc.) |
$endpoint | API endpoint, relative to API URL (ex. /data/Account) |
$options | Request options. Can be any options accepted by GuzzleHttp |
- Returns
- Decoded response from API
- Exceptions
-
OneCRM\APIClient\Client::serverKey |
( |
| ) |
|
Returns API server's public key
OneCRM\APIClient\Client::serverVersion |
( |
| ) |
|
Returns information server software version
Sets authentication used for all subsequent API requests
The documentation for this class was generated from the following file: