-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Minecraft.cs
32 lines (28 loc) · 1.3 KB
/
Minecraft.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using CurseForge.APIClient.Models;
using CurseForge.APIClient.Models.Minecraft;
using System.Threading.Tasks;
namespace CurseForge.APIClient
{
public partial class ApiClient
{
public async Task<GenericListResponse<MinecraftVersionInfo>> GetMinecraftVersions(bool sortDescending = false) =>
await GetList<MinecraftVersionInfo>(
"/v1/minecraft/version",
("sortDescending", sortDescending)
);
public async Task<GenericResponse<MinecraftVersionInfo>> GetSpecificMinecraftVersionInfo(string gameVersionString) =>
await GetItem<MinecraftVersionInfo>(
$"/v1/minecraft/version/{gameVersionString}"
);
public async Task<GenericListResponse<MinecraftModloaderInfoListItem>> GetMinecraftModloaders(string version = null, bool includeAll = false) =>
await GetList<MinecraftModloaderInfoListItem>(
"/v1/minecraft/modloader",
("version", version),
("includeAll", includeAll)
);
public async Task<GenericResponse<MinecraftModloaderInfo>> GetSpecificMinecraftModloaderInfo(string modloaderName) =>
await GetItem<MinecraftModloaderInfo>(
$"/v1/minecraft/modloader/{modloaderName}"
);
}
}