File API SDK examples
You can integrate with the File API using our File API Net SDK.
The File API SDK supports .NET 10.
You can download the SDK examples solution in zip format from here.
File API SDK Examples Usage
You will find extensive information about how to use the examples in the \docs subfolder in the solution.
file-api-sdk-net-10 folder includes a collection of examples that show how to integrate the File API SDK .Net 10 with File API.
Getting Started with Examples
Download and unpack SDK examples solution.
Inside the folder there is a solution called FileAPI.MFT. This solution contains two projects:
- FileAPI.MFT.FileSystem. This project provides examples of how to integrate FileSystem SDK using .Net 10.
- FileAPI.MFT.Streaming. This project provides examples of how to integrate Streaming SDK using .Net 10.
The examples are in the Examples folder and they are created as test methods. Run them if you want to see the SDK working.
Most of the examples require custom parameters (like the tenantid you want to use, the business type you want to upload the files to…).
This required data is in three places:
- config.json: Contains some parameters that the SDK needs.
- Startup.cs: When injecting the SDK, the second parameter needs to be provided.
- In each test: Required data is at the beginning of each test, inside a #region called Custom parameters.
Please, fill the required data before running the examples.
NOTE: If you get errors when executing the examples, they are most likely caused by custom parameters that were not provided correctly.
Projects structure of Examples
Both example projects have the same structure:
- Examples folder contains all the examples as test methods.
- Files folder works as an internal file system. It also provides some sample files.
- config.json contains some parameters that the SDK needs.
- Startup.cs initializes the examples and injects the SDK.
Running Examples
Please, refer to Microsoft documentation.
The examples are populated with some logs. They are stored internally and shown after an example is executed. To see these logs go to the Test Explorer, choose the executed test and press Open additional output for this result. You can get more information here.
WARNING: Take into consideration that the tests run against real environments. This means that they will affect the data in these environments. Remember you can choose the environment in the config.json.
Authors
Youforce - Transporters Team