Endpoints
Thresh.Endpoints provides typed API groups built on top of ILcuHttpClient.
Why use endpoint groups?
- Centralized LCU paths
- Minimal DTOs with stable JSON property mappings
- Cancellation-aware async methods
- Easy replacement/mocking in tests through interfaces
Register endpoint services
services
.AddThresh()
.AddThreshEndpoints();
Available endpoint groups
ILolSummonerApiGetCurrentAsync(...)GetByPuuidAsync(...)
ILolGameflowApiGetSessionAsync(...)GetPhaseAsync(...)
ILolChampSelectApiGetSessionAsync(...)GetPickableChampionIdsAsync(...)
ILolLobbyApiGetLobbyAsync(...)GetReceivedInvitationsAsync(...)
Example
var summoner = provider.GetRequiredService<ILolSummonerApi>();
var gameflow = provider.GetRequiredService<ILolGameflowApi>();
var me = await summoner.GetCurrentAsync(ct);
var phase = await gameflow.GetPhaseAsync(ct);
Console.WriteLine($"{me?.DisplayName} - phase: {phase}");
Stability guidance
Endpoint groups are convenience APIs over the core abstractions. They are intentionally small and can evolve as the LCU surface changes. For long-term compatibility requirements, keep your domain logic isolated from DTO shape assumptions.