2024-08-22 23:59:16 +00:00
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using RustTools.muqing;
|
2024-07-25 13:18:43 +00:00
|
|
|
|
|
|
|
|
|
namespace RustTools.ApiFox;
|
|
|
|
|
|
2024-08-22 23:59:16 +00:00
|
|
|
|
|
|
|
|
|
#pragma warning disable CS8981 // 该类型名称仅包含小写 ascii 字符。此类名称可能会成为该语言的保留值。
|
|
|
|
|
#pragma warning disable IDE1006 // 命名样式
|
|
|
|
|
public class mod
|
2024-07-25 13:18:43 +00:00
|
|
|
|
{
|
|
|
|
|
//最新时间 下载数量 投币数量 更新数量
|
|
|
|
|
//latestTime downloadNumber,coinNumber ,updateNumber
|
2024-08-22 23:59:16 +00:00
|
|
|
|
public const string latestTime = "latestTime";
|
|
|
|
|
public const string downloadNumber = "downloadNumber";
|
|
|
|
|
public const string coinNumber = "coinNumber";
|
|
|
|
|
public const string updateNumber = "updateNumber";
|
2024-07-25 13:18:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 推荐接口
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static async Task<string> random()
|
|
|
|
|
{
|
|
|
|
|
var v = await wl.postAsync("/php/mod.php?action=random", new string[][]{
|
|
|
|
|
new string[] { "number", "6" }});
|
|
|
|
|
return v ?? string.Empty;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static async Task<string> list(string sortMode, string limit, string tag)
|
|
|
|
|
{
|
|
|
|
|
var v = await wl.postAsync("/php/mod.php?action=list", new string[][]{
|
|
|
|
|
new string[] { "sortMode", sortMode },
|
|
|
|
|
new string[] { "limit", limit},
|
|
|
|
|
new string[] { "tag",tag }});
|
|
|
|
|
return v ?? string.Empty;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static async Task<string> getInfo(string account, string modId)
|
|
|
|
|
{
|
2024-08-15 01:40:33 +00:00
|
|
|
|
|
2024-07-25 13:18:43 +00:00
|
|
|
|
var v = await wl.postAsync("/php/mod.php?action=getInfo", new string[][]{
|
|
|
|
|
new string[] { "account", account },
|
|
|
|
|
new string[] { "modId", modId}
|
|
|
|
|
});
|
|
|
|
|
return v ?? string.Empty;
|
|
|
|
|
}
|
|
|
|
|
}
|