Newer
Older
using System;
using FitConnect;
using FitConnect.Models;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
Client client;
void FluentSenderCall() {
client.Sender
.WithDestination("destinationId")
.WithAttachments(Array.Empty<Attachment>())
.WithData(@"{""data"":""content""}")
.Submit();
client.Sender
.WithDestination("destinationId")
.WithAttachments(Array.Empty<Attachment>())
.Submit();
}
void FluentSubscriberCall() {
var submissions = client.Subscriber
client.Subscriber.RequestSubmission("submissionId")
.GetAttachments((attachments => {
// Check if the attachments are valid
return true;
}));
}
ILogger logger = new Logger<AppDomain>(new NullLoggerFactory());
FitConnectEnvironments.Create(FitConnectEnvironments.EndpointType.Development),
"clientId", "clientSecret",
logger);
Console.WriteLine(
"This is a dummy client to demonstrate the usage of the FitConnect SDK for .NET");
FluentSenderCall();
FluentSubscriberCall();