1
0
mirror of synced 2024-11-24 06:16:27 +03:00
api-client-php/README.md

48 lines
801 B
Markdown
Raw Normal View History

2013-07-02 12:39:29 +04:00
IntaroCRM REST API client
2013-07-04 10:18:28 +04:00
=================
2013-07-02 12:37:54 +04:00
2013-07-02 12:39:29 +04:00
PHP Client for [IntaroCRM REST API](http://docs.intarocrm.ru/rest-api/).
2013-07-03 18:13:25 +04:00
2013-07-04 12:44:41 +04:00
Requirements
------------
2013-07-03 18:13:25 +04:00
2013-07-04 08:43:12 +04:00
* PHP version 5.2 and above
2013-07-03 18:13:25 +04:00
* PHP-extension CURL
2013-07-04 12:44:41 +04:00
Installation
------------
Add IntaroCRM REST API client in your composer.json:
```js
{
"require": {
2013-07-04 13:09:09 +04:00
"intarocrm/crm-rest-api": "dev-master"
2013-07-04 12:44:41 +04:00
}
}
```
Usage
------------
### Create API clent class
``` php
$crmApiClient = new \IntaroCrmRestApi('http://demo.intarocrm.ru',
'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH');
2013-07-04 12:44:41 +04:00
```
Constructor arguments are:
1. Your IntaroCRM acount URL-address
2. Your site API Token
2013-07-04 12:44:41 +04:00
### Example: get order types list
``` php
$orderTypes = $crmApiClient->orderTypesList();
if (!is_null($crmApiClient->getLastError()))
return $crmApiClient->getLastError();
```