DepotDownloaderLib 1.0.9

There is a newer version of this package available.
See the version list below for details.
dotnet add package DepotDownloaderLib --version 1.0.9                
NuGet\Install-Package DepotDownloaderLib -Version 1.0.9                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DepotDownloaderLib" Version="1.0.9" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DepotDownloaderLib --version 1.0.9                
#r "nuget: DepotDownloaderLib, 1.0.9"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DepotDownloaderLib as a Cake Addin
#addin nuget:?package=DepotDownloaderLib&version=1.0.9

// Install DepotDownloaderLib as a Cake Tool
#tool nuget:?package=DepotDownloaderLib&version=1.0.9                

<div align="center"> <img width="100" height="100" src="https://cdn.discordapp.com/attachments/741123537582162020/965619554426437732/wicon.png"> <h1 align="center">DepotDownloaderLib</h1>

Built with:

Rider C# .Net

Uses: <a href="https://github.com/SteamRE/DepotDownloader">SteamRE/DepotDownloader</a> <br> REQUIRES DOTNET 7 </div>

Install via <a href="https://www.nuget.org/packages/DepotDownloaderLib">nuget</a>:

PM> Install-Package DepotDownloaderLib

<h2>Overview:</h2>

The DepotDownloaderLib is a simple Wrapper Library for <a href="https://github.com/SteamRE/DepotDownloader">SteamRE/DepotDownloader</a> so u can interface with it easily inside ur Programm

<h3>Usage:</h3> Start by creating a List to store the arguments you want to provied to DepotDownloader

List<DownloaderArgument> arguments = new List<DownloaderArgument>();

then you add your add your desired Arguments by adding objects of type "DownloaderArgument" to your list, these take 2 parameters (Argument Type and Argument Value), like in following Example. Add the <a href="#supported-argument-types">bottom</a> of the ReadMe File you will find a list of all supported argument types. The Following Example downloads a specific Manifest from R6S, so your account needs to own this game to be able to download this manifest

arguments.Add(new DownloaderArgument(ArgType.AppId, "359550"));
arguments.Add(new DownloaderArgument(ArgType.DepotId, "377237"));
arguments.Add(new DownloaderArgument(ArgType.ManifestId, "8358812283631269928"));
arguments.Add(new DownloaderArgument(ArgType.Username, "steamLoginName"));
arguments.Add(new DownloaderArgument(ArgType.Password, "steamPassword"));
arguments.Add(new DownloaderArgument(ArgType.Directory, @"C:\Users\username\Downloads\testfolder"));

<br> To start the download with the arguments from the List, all you need to do is call the following method:

DepotDownloaderLib.StartDownload(arguments);
//If calling this method from a GUI, call this instead:
DepotDownloaderLib.StartDownload(arguments, true);
//this calls the method in a backgroundWorker instead so it doesnt block the UI thread

<h3>Extended Usage:</h3>

using DepotDownloaderLib.onConsoleOutput you can add ur own functionality to DepotDownloaders "BuiltIn" Console Output. For example with the following code u can access the current download percentage and the latest written file path.

//f is the current download progress (type float)
//s is the latest written file (type string)
DepotDownloaderLib.onConsoleOutput += (f, s) =>
{
    Console.WriteLine("Current download progress: " + f);
    Console.WriteLine("Last written file " + s);
};

by default, DepotDownloader request the 2FA Code as a Console.ReadLine, you can intercept this call by using the following code:

DepotDownloaderLib.onConsoleInput += () =>
{
    return "Example2FACode";
};
//The return data of this function gets directly piped into the DepotDownloader 2FA Request instead of its default Console.ReadLine

This can be used to for example get the 2FA code from a UserInput inside the GUI of your app

<h1>How to use DepotDownloaderLib with a GUI (WPF specifically)</h1> In my Repo <a href="https://github.com/WeeXnes/DepotDownloaderGuiExample">WeeXnes/DepotDownloaderGuiExample</a> you can see how to use this library with a GUI(WPF)

<h3>Supported Argument Types:</h3>

public enum ArgType
{
    AppId,
    DepotId,
    ManifestId,
    Username,
    Password,
    RememberPassword,
    Directory,
    MaxServers,
    MaxDownloads,
}
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.1 168 8/10/2023
1.1.0 106 8/10/2023
1.0.9 119 5/19/2023
1.0.8 96 5/17/2023
1.0.6 106 4/27/2023
1.0.5 115 4/13/2023
1.0.2 114 4/13/2023
1.0.1 115 4/13/2023