From 767f6397af85fe270a432468496b95ca4a4682ff Mon Sep 17 00:00:00 2001 From: Dmitry Mamontov Date: Mon, 3 Nov 2014 13:50:28 +0300 Subject: [PATCH] initial commit --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..985335f --- /dev/null +++ b/README.md @@ -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 orderTypes = new Dictionary(); + +RestApi api = new RestApi(url, key); +try { + orderTypes = api.orderTypesList(); +} catch (ApiException e) { + Console.WriteLine(ex.Message); +} catch (CurlException e) { + Console.WriteLine(ex.Message); +} + +``` \ No newline at end of file