Skip to content
Snippets Groups Projects
Commit 0f0b6948 authored by Klaus Fischer's avatar Klaus Fischer
Browse files

WIP: updating docu

parent 4bb0fff0
No related branches found
No related tags found
1 merge request!3Feature/440 mvp net sdk part 1
......@@ -21,5 +21,6 @@ public static class SenderDemo {
.WithAttachments(new[] { new Attachment("Test.pdf", "Test Attachment") })
.WithData("{\"message\":\"Hello World\"}")
.Submit();
}
}
# Fit-Connect .NET SDK
For an implementation example take a look at the [DummyClient](DummyClient/Program.cs)
## Structure
For the structure look the [Structure documentation](structure.md)
For an implementation example take a look at the [DemoRunner](DemoRunner/Program.cs)
## **!! IN DEVELOPMENT NOT FOR PRODUCTION USE !!**
**Fit-Connect .NET SDK** is a .NET library for the Fit-Connect API.
Die Verwendung des SDKs ist in der [documentation (ger)](./Documentation/documentation.de-DE.md)
erklärt
## For information how to use the SDK and FitConnect visit:
* [SDK-Documentation](./documentation/documentation.md)
* [FIT-Connect Documentation](https://docs.fitko.de/fit-connect/docs)
* [FIT-Connect Documentation](https://fit-connect.com/docs)
* [SDK-Dokumentation](./documentation/documentation.de-DE.md)
* [FIT-Connect Dokumentation](https://docs.fitko.de/fit-connect/docs)
* [FIT-Connect Dokumentation](https://fit-connect.com/docs)
<!--
## Structure
For the structure look the [Structure documentation](structure.md)
-->
# Sender
```mermaid
flowchart TD
start([GetSender])
destination[WithDestination]
service[WithServiceType]
attachments[WithAttachments]
data([WithData])
start-->destination-->service-->attachments-->data
```
## .WithDestination(destinationId)
Die Destination ID des Zustelldienstes muss an dieser Stelle übergeben werden.
_Noch nicht vollständig getestet!_<br>
Eine Möglichkeit die Destination ID zu ermitteln geht über die Methode ``FindDestinationId()`` des
Senders.
## .WithServiceType("FIT Connect Demo", leikaKey)
For an implementation example take a look at the [DummyClient](DummyClient/Program.cs)
Der Service Type muss an dieser Stelle übergeben werden.
Hierfür wird ein Leika Schlüssel benötigt.
Die Leika Schlüssel haben diese Form ```urn:de:fim:leika:leistung:99400048079000```
## Ignored Files
## .WithAttachments(new Attachment("Test.pdf", "Test Attachment"))
The files listed below are ignored and necessary just for development. In production the information
is provided by the user of the SDK.
Die Anhänge zum Antrag werden mit ```.WithAttachments``` übergeben.
Diese Methode erwartet ein Array von Attachment Objekten welche als ```params``` übergeben werden
können.
Das Attachment kann mit
You need a secret file for e2e test like:
- Metadaten und byte[] content
- Dateiname und Beschreibung
```json
{
"sender": {
"id": "00000000-0000-0000-0000-000000000000",
"secret": "0000000000000000000000000000000000000000000",
"scope": "send:region:DE"
}
}
erstellt werden.
Dazu werden zwei Konstruktoren bereitgestellt:
- ```Attachment(Api.Metadata.Attachment metadata, byte[] content)```
- ```Attachment(string fileName, string description,)```
## .WithData("{\"message\":\"Hello World\"}")
Die Fachdaten werden als JSON String übergeben.
## .Submit()
Das Abschicken der Submission erfolgt mit diesem Aufruf.
## Beispiel
```csharp
var submission = Client
.GetSender(FitConnectEnvironment.Development, clientId, clientSecret, logger)
.WithDestination(destinationId)
.WithServiceType("FIT Connect Demo", leikaKey)
.WithAttachments(new Attachment("Test.pdf", "Test Attachment"))
.WithData("{\"message\":\"Hello World\"}")
.Submit();
```
# API Abstraction
# Subscriber
```mermaid
sequenceDiagram
Client->>FitConnectServer: SendSubmission
FitConnectServer->>Client: Success
## Beispiel
```csharp
var submission = Client
.GetSender(FitConnectEnvironment.Development, clientId, clientSecret, logger)
.WithDestination(destinationId)
.WithServiceType("FIT Connect Demo", leikaKey)
.WithAttachments(new Attachment("Test.pdf", "Test Attachment"))
.WithData("{\"message\":\"Hello World\"}")
.Submit();
```
## The sender process
```mermaid
sequenceDiagram
Sender->>FitConnectServer: GetSubmissions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment