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

50 lines
812 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-05 14:18:52 +04:00
"intarocrm/rest-api-client": "dev-master"
2013-07-04 12:44:41 +04:00
}
}
```
Usage
------------
### Create API clent class
``` php
2013-07-04 17:03:35 +04:00
$crmApiClient = new \IntaroCrm\RestApi(
2013-10-08 11:19:38 +04:00
'https://demo.intarocrm.ru',
2013-07-04 17:03:35 +04:00
'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();
2013-07-04 15:51:49 +04:00
if (!is_null($crmApiClient->getLastError()))
return $crmApiClient->getLastError();
2013-10-08 11:19:38 +04:00
```