EncompassRest 1.2.2

Encompass API Client Library for .NET

Install-Package EncompassRest -Version 1.2.2
dotnet add package EncompassRest --version 1.2.2
<PackageReference Include="EncompassRest" Version="1.2.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EncompassRest --version 1.2.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

EncompassRest

Encompass API Client Library for .NET Framework 4.5+ and .NET Standard 1.1+.

Getting Started

  1. Install the EncompassRest Nuget package.
  2. Create an async method in your consuming code.
  3. Create an EncompassRestClient object.
  4. Use EncompassRestClient object to make API calls.

Create an async method

EncompassRest is a fully asynchronous library meaning all of it's Encompass API calls are made asynchronously to allow great performance for maximum throughput. To get started using the library you need to write an async method. To avoid deadlocks with async code it is recommended you DO NOT use Task.Result or the Task.Wait methods and instead implement async all the way from the top, e.g. Main or your Controllers actions.

Web apps:
public async Task<IActionResult> GetAsync()
{
    // Your async code goes here
}
Console apps:

For C#7.1 and up you should use an async Main method like so.

public async Task Main()
{
    // Your async code goes here
}

For C#7 and below you should use Task.Run inside of Main to use async methods.

public void Main()
{
    Task.Run(async () => {
        // Your async code goes here
    }).GetAwaiter().GetResult();
}

Create an EncompassRestClient object

The EncompassRestClient class implements IDisposable so it is recommended to use using statements to automatically dispose of the object.

Auto-retrieve new token when expired
using (var client = await EncompassRestClient.CreateAsync(new ClientParameters("apiClientId", "apiClientSecret"),
    tokenCreator => tokenCreator.FromUserCredentialsAsync("encompassInstanceId", "encompassUserId", "encompassPassword")))
{
    // use client
}
From User Credentials
using (var client = await EncompassRestClient.CreateFromUserCredentialsAsync(new ClientParameters("apiClientId", "apiClientSecret"), "encompassInstanceId", "encompassUserId", "encompassPassword"))
{
    // use client
}
From Authorization Code
using (var client = await EncompassRestClient.CreateFromAuthorizationCodeAsync(new ClientParameters("apiClientId", "apiClientSecret"), "redirectUri", "authorizationCode"))
{
    // use client
}
From Access Token
using (var client = await EncompassRestClient.CreateFromAccessTokenAsync(new ClientParameters("apiClientId", "apiClientSecret"), "accessToken"))
{
    // use client
}

Use EncompassRestClient object

Use the various properties on EncompassRestClient such as Loans, Schema, Webhook, Pipeline, and BatchUpdate to make Encompass API calls.


EncompassRest

Encompass API Client Library for .NET Framework 4.5+ and .NET Standard 1.1+.

Getting Started

  1. Install the EncompassRest Nuget package.
  2. Create an async method in your consuming code.
  3. Create an EncompassRestClient object.
  4. Use EncompassRestClient object to make API calls.

Create an async method

EncompassRest is a fully asynchronous library meaning all of it's Encompass API calls are made asynchronously to allow great performance for maximum throughput. To get started using the library you need to write an async method. To avoid deadlocks with async code it is recommended you DO NOT use Task.Result or the Task.Wait methods and instead implement async all the way from the top, e.g. Main or your Controllers actions.

Web apps:
public async Task<IActionResult> GetAsync()
{
    // Your async code goes here
}
Console apps:

For C#7.1 and up you should use an async Main method like so.

public async Task Main()
{
    // Your async code goes here
}

For C#7 and below you should use Task.Run inside of Main to use async methods.

public void Main()
{
    Task.Run(async () => {
        // Your async code goes here
    }).GetAwaiter().GetResult();
}

Create an EncompassRestClient object

The EncompassRestClient class implements IDisposable so it is recommended to use using statements to automatically dispose of the object.

Auto-retrieve new token when expired
using (var client = await EncompassRestClient.CreateAsync(new ClientParameters("apiClientId", "apiClientSecret"),
    tokenCreator => tokenCreator.FromUserCredentialsAsync("encompassInstanceId", "encompassUserId", "encompassPassword")))
{
    // use client
}
From User Credentials
using (var client = await EncompassRestClient.CreateFromUserCredentialsAsync(new ClientParameters("apiClientId", "apiClientSecret"), "encompassInstanceId", "encompassUserId", "encompassPassword"))
{
    // use client
}
From Authorization Code
using (var client = await EncompassRestClient.CreateFromAuthorizationCodeAsync(new ClientParameters("apiClientId", "apiClientSecret"), "redirectUri", "authorizationCode"))
{
    // use client
}
From Access Token
using (var client = await EncompassRestClient.CreateFromAccessTokenAsync(new ClientParameters("apiClientId", "apiClientSecret"), "accessToken"))
{
    // use client
}

Use EncompassRestClient object

Use the various properties on EncompassRestClient such as Loans, Schema, Webhook, Pipeline, and BatchUpdate to make Encompass API calls.


GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.2.2 287 6/1/2020
1.2.1 913 4/23/2020
1.2.0 2,614 1/22/2020
1.1.0 2,465 9/25/2019
1.0.0 4,314 6/3/2019
0.6.0 2,223 12/7/2018
0.5.0 745 9/12/2018
0.4.0 2,319 4/27/2018
0.3.0 514 2/15/2018
0.2.1 512 12/22/2017
0.2.0 489 12/18/2017
0.1.0 604 11/30/2017