Soukoku.DropboxSignApi 3.0.0-alpha1

This is a prerelease version of Soukoku.DropboxSignApi.
dotnet add package Soukoku.DropboxSignApi --version 3.0.0-alpha1
NuGet\Install-Package Soukoku.DropboxSignApi -Version 3.0.0-alpha1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soukoku.DropboxSignApi" Version="3.0.0-alpha1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Soukoku.DropboxSignApi --version 3.0.0-alpha1
#r "nuget: Soukoku.DropboxSignApi, 3.0.0-alpha1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Soukoku.DropboxSignApi as a Cake Addin
#addin nuget:?package=Soukoku.DropboxSignApi&version=3.0.0-alpha1&prerelease

// Install Soukoku.DropboxSignApi as a Cake Tool
#tool nuget:?package=Soukoku.DropboxSignApi&version=3.0.0-alpha1&prerelease

DropboxSignApi

This is v3 of an unofficial Dropbox Sign (previously HelloSign) API lib for dotnet 4.6.2+ and core versions. It uses HttpClient to do the API calls and supports the async operations out of the box. This v3 is still a work in progress.

How to get it

This lib is available via the NuGet package Soukoku.DropboxSignApi.

Using the library

All API access is done through an instance of the DropboxSignClient.

// all examples later will make use of this 'client' object
var client = new DropboxSignClient("your apiKey here");

Request models

This library defines tailored models for different requests parameters, so it's easy to see what are the supported properties for each request type.

var sigRequest = new SendSignatureRequestRequest();
// ...
// set various request properties here
// ...
SignatureRequestResponseWrap response = await client.SendSignatureRequestAsync(sigRequest);
Files in requests

For any requests that support file uploads you can use either the FileUrls or Files property. Use them either for remote http files or local files, but not both in a single request.

// remote file
sigRequest.FileUrls.Add(new Uri("http://path-to-remote-file"));

// or local file path
sigRequest.Files.Add(new PendingFile("path\to\local\file", "file name here"));

// or local file bytes
byte[] fileData = ...// some how get file data
sigRequest.Files.Add(new PendingFile(fileData, "file name here"));

// or local file stream
Stream fileData = ...// some how get file stream
sigRequest.Files.Add(new PendingFile(fileData, "file name here"));

Note that for local files, you will be responsible in disposing the request object to clean up the streams. It's best to just wrap the request in a using

using (var sigRequest = new SendSignatureRequestRequest()) {
  // do things with it
}

Response models

All API calls will return the ResponseWrap class and its sub-classes. The ResponseWrap contains all the returned information from the API call, including any error, warnings, and rate-limiting information.

This means that, assuming the parameters are valid and there are no network errors, all API calls will not throw an Exception and you will need to handle the returned response as appropriate based on the error and http status code.

SignatureRequestResponseWrap response = await client.SendSignatureRequestAsync(sigRequest);

// maybe check rate limits
if (response.RateLimitRemaining < 10)
{
    // do something about it
}

// handle result
if (response.Error == null) 
{
    SignatureRequest finalRequest = response.SignatureRequest;
    // do work ...
} 
else 
{
    // handle error
}


Magic string values

Many of the models contain string properties that have pre-defined values. Where applicable, the property doc (intellisense) will indicate where you can find those values. They are usually defined as string constants in a similarly-named static class.

For example, the ErrorNames class contains the possible values for the Error.Name property

// handle error in a response
switch(response.Error.Name)
{
    case ErrorNames.ExceededRate:
        // handle it
        break;
    case ErrorNames.InvalidRecipient:
        // handle it
        break;
    // more cases
}


Event model

This lib can also be used to parse the webhook event callback data:

string jsonData = ...;// somehow get the event callback json content
var wrap = client.ParseEvent(jsonData);
// handle the event
switch(wrap.Event.EventType)
{
    case EventTypes.SignatureRequestSigned:
        // do something
        break;
    case EventTypes.SignatureRequestEmailBounce:
        // do something
        break;
    // more cases
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0-alpha1 107 12/31/2022