Ers.ApiClient 1.2.1-rc

This is a prerelease version of Ers.ApiClient.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Ers.ApiClient --version 1.2.1-rc
                    
NuGet\Install-Package Ers.ApiClient -Version 1.2.1-rc
                    
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="Ers.ApiClient" Version="1.2.1-rc" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ers.ApiClient" Version="1.2.1-rc" />
                    
Directory.Packages.props
<PackageReference Include="Ers.ApiClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ers.ApiClient --version 1.2.1-rc
                    
#r "nuget: Ers.ApiClient, 1.2.1-rc"
                    
#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.
#:package Ers.ApiClient@1.2.1-rc
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ers.ApiClient&version=1.2.1-rc&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Ers.ApiClient&version=1.2.1-rc&prerelease
                    
Install as a Cake Tool

Ers.Apiclient

A simple .NET client for the European Respiratory Society REST API.

ErsApiClient class

Provides wrapping methods around ERS API endpoints.

Constructor

Instantiation of the ErsApiClient class requires ERS API credentials (username + password), which will be used internally to request a OAuth 2 JWT token.

Optionally a URI of the ERS API base address can also be provided, typically to target the development API instead of the production API.

ErsApiClient client = new ErsApiClient("api username", "api password");
// Or
ErsApiClient devClient = new ErsApiClient("api username", "api password", "https://crmapitest.ersnet.org/");

GetAuthorizedPropertiesAsync

Returns contact properties that are authorized for the current API caller.

string[] properties = await client.GetAuthorizedPropertiesAsync();

AuthenticateAsync

Authenticates the specified contact's credentials and returns properties of the authenticated contact, if found.

If no contact matches the provided credentials, the method returns null.

The third argument 'includedProperties' accepts an optional comma separated list of properties to be returned in the response. If the parameter is omitted, only the ContactId property of the authenticated contact is returned.

This overload returns a JSON string.

var json = await client.AuthenticateAsync("contact username", "contact password", "Title,LastName,FirstName,SmtpAddress1");

AuthenticateAsync<T>

Authenticates the specified contact's credentials and returns properties of the authenticated contact, if found.

This overload converts the JSON result to the type T, assuming the respone can be converted to this type.

var contact = await client.AuthenticateAsync<Ers.ApiClient.Models.Contact>("contact username", "contact password", "Title,LastName,FirstName,SmtpAddress1");

AuthenticateEmailAsync

Authenticates the specified contact's SMTP address and returns properties of the authenticated contact, if found.

If no contact matches the provided SMTP address, the method returns null.

If more than one contact match the provided SMTP address, a NotSupportedException is thrown.

The third argument 'includedProperties' accepts an optional comma separated list of properties to be returned in the response. If the parameter is omitted, only the ContactId property of the authenticated contact is returned.

This overload returns a JSON string.

var json = await client.AuthenticateAsync("contact username", "contact password", "Title,LastName,FirstName,MainCity,MainCountryCode");

AuthenticateEmailAsync<T>

Authenticates the specified contact's SMTP address and returns properties of the authenticated contact, if found.

This overload converts the JSON result to the type T, assuming the respone can be converted to this type.

var contact = await client.AuthenticateAsync<Ers.ApiClient.Models.Contact>("contact username", "contact password", "Title,LastName,FirstName,MainCity,MainCountryCode");

Ers.ApiClient.Models.Contact class

This is a simple ERS API contact Data Transfer Object class that can be used as a type parameter for the ErsApiClient.AuthenticateAsync<T> generic method.

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
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

First version