This repository contains the source code of the reference client for interacting with the FlexPlus DataExchange API through the command line interface.
With this client you can download files from the API and upload files to it through the command line.
To use the client, you just do the following steps:
- Open a Powershell window.
- Clone this repository to your local machine with:
git clone https://github.com/world-direct/FlexPlus.DataExchange.git
- Navigate to the folder of the project on your local machine with:
cd FlexPlus.DataExchange
- Execute following command:
dotnet build
- To find the created executable, navigate to folder
bin\Debug\netcoreapp3.1
in the project folder.
cd FlexPlus.DataExchange\bin\Debug\netcoreapp3.1
To download a file you just use the download
command with the required parameters. The downloaded CSV file will be saved in the same folder as the executable.
Windows:
.\FlexPlus.DataExchangeApiClient.exe download -p <Process name> -e <url of API> -t <token to authenticate>
To upload a file from the API just use the upload
command with the required parameters.
Windows:
.\FlexPlus.DataExchangeApiClient.exe upload -p <Process name> -e <url of API> -t <token to authenticate> -f <absolute or relative path of the file>
- .NET Core 3.1
- CommandLineParser 2.8.0
To get more information within the program use the help command
with:
Windows:
.\FlexPlus.DataExchangeApiClient.exe --help
If you need help to a specific command use:
Windows:
.\FlexPlus.DataExchangeApiClient.exe upload --help
or
.\FlexPlus.DataExchangeApiClient.exe download --help