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