-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Games.cs
28 lines (23 loc) · 1.12 KB
/
Games.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
using CurseForge.APIClient.Models;
using CurseForge.APIClient.Models.Games;
using System.Threading.Tasks;
namespace CurseForge.APIClient
{
public partial class ApiClient
{
public async Task<GenericListResponse<Game>> GetGamesAsync(int? index = null, int? pageSize = null) =>
await GetList<Game>(
"/v1/games",
("index", index),
("pageSize", pageSize)
);
public async Task<GenericResponse<Game>> GetGameAsync(int gameId) =>
await GetItem<Game>($"/v1/games/{gameId}");
public async Task<GenericListResponse<GameVersionsByType>> GetGameVersionsAsync(int gameId) =>
await GetList<GameVersionsByType>($"/v1/games/{gameId}/versions");
public async Task<GenericListResponse<GameVersionsByType2>> GetGameVersionsAsyncV2(int gameId) =>
await GetList<GameVersionsByType2>($"/v2/games/{gameId}/versions");
public async Task<GenericListResponse<GameVersionType>> GetGameVersionTypesAsync(int gameId) =>
await GetList<GameVersionType>($"/v1/games/{gameId}/version-types");
}
}