Skip to content

Latest commit

 

History

History
70 lines (58 loc) · 2.28 KB

DownloadsApi.md

File metadata and controls

70 lines (58 loc) · 2.28 KB

Downloads Methods

Method Description
DownloadFile Download File

DownloadFile

System.IO.Stream DownloadFile (string subdir, string filename, string dir, int rotation = null, string download = null, CancellationToken cancellationToken = default)

System.IO.Stream DownloadFile (HttpClient methodClient, string subdir, string filename, string dir, int rotation = null, string download = null, CancellationToken cancellationToken = default)

Download File

Get File

Example

using System.Collections.Generic;
using System.Diagnostics;
using ShipEngineSDK;
using ShipEngineSDK.Model;

namespace Example
{
    public class DownloadFileExample
    {
        public static async Task Main()
        {
            var shipEngine = new ShipEngine("api_key");
            var subdir = "subdir_example";
            var filename = "filename_example";
            var dir = "dir_example";
            var rotation = 56;
            var download = "download_example";

            try
            {
                // Download File
                System.IO.Stream result = await shipEngine.DownloadFile(subdir, filename, dir, rotation, download);
                Debug.WriteLine(result);
            }
            catch (ShipEngineException e)
            {
                Debug.Print("Exception when calling DownloadsApi.DownloadFile: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
methodClient HttpClient The HttpClient instance to use for the request.
subdir string
filename string
dir string
rotation int [optional]
download string [optional]
cancellationToken CancellationToken The cancellation token to use for the request.

Return type

System.IO.Stream