Skip to content

dealforward/cord.net.sdk

Repository files navigation


Cord .NET SDK

Toolkit for the Cord.

Downloads Contributors Issues License Nuget (with prereleases)

About The Project

It is a Software Development Kit project for the .NET platform where you can interact with Cord. It aims to be able to use REST ends on Cord and execute authentication processes.

Getting Started

To start using it, include it in your project using the .NET CLI or Package Manager.

Installation

.NET CLI

dotnet add package Cord.SDK

Package Manager

NuGet\Install-Package Cord.SDK

Configuration

NET project, you can make SDK related configurations as in the example below.

builder.Services.AddCordSdk(opt =>
{
    opt.ApplicationId = "ID";
    opt.Secret = "SECRET";
});
Property Type Description Required Default
ApplicationId string Application id for Rest API access
Secret string Secret key for Rest API access
ClientTokenExpiration int Specifies the expiration time in minutes of the token required for users to connect to Cord. 60
ServerTokenExpiration int Specifies the expiration time in minutes of the token to be used by the server in Rest API communication. 1440

Usage

To access Cord services, inject the ICord interface into your method or class.

async Task MyMethod([FromServices] ICord cord)
{
  cord.Users.V1.*****
}
public class MyClass
{
  private readonly ICord _cord;

  public MyClass(ICord cord) => _cord = cord;

  public async Task MyMethod()
  {
      _cord.Organizations.V1.*****
  }
}

All methods of services for the Rest API have implemented CancellationToken.

About

.NET Toolkit for the communication of Cord.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages