Update README.md
This commit is contained in:
parent
7764b89e43
commit
0ac7375802
@ -28,9 +28,8 @@ Usage
|
||||
|
||||
``` php
|
||||
|
||||
$crmApiClient = new \IntaroCrmRestApi('http://demo.intarocrm.ru',
|
||||
$crmApiClient = new \IntaroCrm\RestApi('http://demo.intarocrm.ru',
|
||||
'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH');
|
||||
|
||||
```
|
||||
Constructor arguments are:
|
||||
|
||||
@ -42,7 +41,7 @@ Constructor arguments are:
|
||||
``` php
|
||||
|
||||
$orderTypes = $crmApiClient->orderTypesList();
|
||||
|
||||
if (!is_null($crmApiClient->getLastError()))
|
||||
return $crmApiClient->getLastError();
|
||||
|
||||
```
|
@ -44,11 +44,13 @@ class RestApi
|
||||
$this->apiKey = $apiKey;
|
||||
}
|
||||
|
||||
|
||||
public function getStatusCode()
|
||||
{
|
||||
return $this->statusCode;
|
||||
}
|
||||
|
||||
/* Получение кода статуса и сообщения об ошибке */
|
||||
public function getLastError()
|
||||
{
|
||||
if (!is_null($this->lastError))
|
||||
@ -57,6 +59,7 @@ class RestApi
|
||||
return null;
|
||||
}
|
||||
|
||||
/* Псообщения об ошибке */
|
||||
public function getLastErrorMessage()
|
||||
{
|
||||
return $this->lastError;
|
||||
|
Loading…
Reference in New Issue
Block a user