AListSdkSharp 1.2.1

dotnet add package AListSdkSharp --version 1.2.1                
NuGet\Install-Package AListSdkSharp -Version 1.2.1                
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="AListSdkSharp" Version="1.2.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AListSdkSharp --version 1.2.1                
#r "nuget: AListSdkSharp, 1.2.1"                
#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 AListSdkSharp as a Cake Addin
#addin nuget:?package=AListSdkSharp&version=1.2.1

// Install AListSdkSharp as a Cake Tool
#tool nuget:?package=AListSdkSharp&version=1.2.1                

AListSdkSharp - AList SDK for C#

AListSdkSharp 是C#的AList SDK访问层,用于访问AList的API。 使用flurl作为http请求库。

更新日志

version 1.2.0: 增加了Storage相关的操作,包括获取存储列表,禁用存储,启用存储

version 1.1.5: Info支持headers参数,用于115网盘的分享

version 1.1.4: Download支持headers参数

version 1.1.3:

删除fs中Related字段,解决Related不为string的问题

version 1.1.2:

RangeDownload改为ResponseHeadersRead,防止大量预下载

version 1.1:

本次更新较大,删除了以前的用法,更新为新用法,现在使用更加简单。

安装

dotnet add package AListSdkSharp

基本用法

var baseUrl = "Alist服务器地址(https://alist.pages.dev/)";
var username = "服务器用户名";
var password = "服务器密码";

var auth = new Auth(baseUrl); // 创建一个Auth对象
var a = await auth.Login(username, password); // 登录
var token = a.Data.Token; // 获取token

var fs = new Fs(baseUrl); // 创建一个Fs对象
var b = await fs.List(token, new ListIn()
{
    Path = "要获取的目录"
}); // 获取目录信息

var c = await fs.Info(token, new ListIn()
{
    Path = "要获取的文件"
});

var stream = await fs.Download(c); // 下载文件
var file = File.Create("文件");
await stream.CopyToAsync(file);
file.Close();

// 存储相关
var storage = new Storage(baseUrl); // 创建一个Storage对象
var b = await storage.List(token); // 获取文件列表
var d = await storage.Disable(token, 2); // 禁用指定id的存储
var c = await storage.Enable(token, 2); // 启用指定id的存储

开源协议

license

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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.2.1 88 10/24/2024
1.2.0 81 10/17/2024
1.1.5 150 7/29/2024
1.1.4 91 7/24/2024
1.1.3 112 6/28/2024
1.1.2 112 5/17/2024
1.1.1 118 4/8/2024
1.1.0 104 4/3/2024
1.0.1 185 5/8/2023
1.0.0 158 5/8/2023