mirror of
https://github.com/retailcrm/api-client-dotnet.git
synced 2024-11-21 20:36:02 +03:00
initial commit
This commit is contained in:
parent
8e967fdde2
commit
767f6397af
45
README.md
Normal file
45
README.md
Normal file
@ -0,0 +1,45 @@
|
||||
RetailCRM REST API client for .NET
|
||||
==================================
|
||||
|
||||
Java Client for [RetailCRM REST API](http://www.retailcrm.ru/docs/rest-api/index.html).
|
||||
version: 3.0.0
|
||||
|
||||
Requirements
|
||||
------------
|
||||
* [Newtonsoft.Json](http://james.newtonking.com/json)
|
||||
|
||||
Usage
|
||||
------------
|
||||
|
||||
### Create API client class
|
||||
|
||||
``` cs
|
||||
using RetailCrm;
|
||||
...
|
||||
RestApi api = new RestApi(
|
||||
"https://demo.intarocrm.ru",
|
||||
"T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH"
|
||||
);
|
||||
```
|
||||
Constructor arguments are:
|
||||
|
||||
1. Your IntaroCRM acount URL-address
|
||||
2. Your site API Token
|
||||
|
||||
### Example: get order types list
|
||||
|
||||
``` cs
|
||||
|
||||
string url, key;
|
||||
Dictionary<string, object> orderTypes = new Dictionary<string, object>();
|
||||
|
||||
RestApi api = new RestApi(url, key);
|
||||
try {
|
||||
orderTypes = api.orderTypesList();
|
||||
} catch (ApiException e) {
|
||||
Console.WriteLine(ex.Message);
|
||||
} catch (CurlException e) {
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
|
||||
```
|
Loading…
Reference in New Issue
Block a user