The client can be downloaded from NuGet.
- The following example console application projects are available:
- After downloading the example solution or one of the console application projects the 'inmation-api-client' NuGet package needs to be restored.
Code snippet:
using inmation.api;
Client apiClient = new Client();
string WebSocketUrl = "ws://localhost:8002/ws";
ConnectOptions options = new ConnectOptions("USERNAME", "PASSWORD");
// Connect and authenticate. By providing credentials to the connectWs method, the credentials will be stored in the session.
ConnectionResponse connectResponse = apiClient.ConnectWs(WebSocketUrl, options).Result;
if (connectResponse.Error != null)
{
Console.WriteLine(string.Format("Connect failed: {0}", connectResponse.Error?.First().Message));
}