Changelog

C# Library Quickstart

Configure Project

  1. First install the library from nuget and add it to your project.
<PackageReference Include="Dapi" Version="1.0.0"/>
  1. Import Dapi's library in your code.
using Dapi;
using Dapi.Products;
using Dapi.Response;
using Dapi.Types;
  1. Create a Dapi app with your App Secret
namespace TestConsoleApp {
    public class TestClass {
        private DapiApp myApp;

        public TestClass() {
            myApp = new DapiApp("YOUR_APP_SECRET");
        }
    }
}
  1. Now you can use any of the functions of the DapiApp instance, myApp. Here is an example for getAccounts.
namespace TestConsoleApp {
    public class TestClass {
        public void TestFunc() {
            var resp = myApp.getAccounts("YOUR_ACCESS_TOKEN", "YOUR_USER_SECRET");
            // do something with the resp
        }
    }
}

Complete example

You need to replace the placeholders in this code snippet(appSecret, accessToken, userSecret) with your own values.

using System.Collections.Generic;
using Dapi;
using Dapi.Products;
using Dapi.Response;
using Dapi.Types;


namespace TestConsoleApp {
    public class TestClass {
        private DapiApp myApp;

        public TestClass() {
            myApp = new DapiApp("YOUR_APP_SECRET");
        }

        public void TestFunc() {
            var resp = myApp.getAccounts("YOUR_ACCESS_TOKEN", "YOUR_USER_SECRET");
            // do something with the resp
        }
    }
}