Authentication Polling, Typed Requests and Client Lifecycle listener
This is the finished release for 5.0.0. It features authentication polling, typed json requests and a brand new League Client lifecycle listener.
Documentation for the new release has been published. The GitHub Wiki has been removed because the documentation is no longer hosted there.
Added
request<T>
will now properly return aResponse<T>
whose .json() method will return aT
(typescript)authenticate
now has options toawaitConnection
, searching until a LeagueClientUx process has been found.- Running the library on a platform the game doesn't support will now throw an
InvalidPlatformError
upon calls toauthenticate
LeagueClient
is a new LeagueClientUx process lifecycle listener, detecting client shutdowns and startups
Fixes
- Fixed a bug where LeagueWebSocket's subscriptions would attach twice upon registration
- Removed unnecessary
fs-extra
dependency
Breaking Changes
These changes are not major, but it will end up breaking edge case usage.
Credentials
, the type returned fromauthenticate
no longer returns the HTTP protocol used or the process name. These can always be assumed to be"https"
and"LeagueClientUx"
.- This is because the new implementation uses the process command line arguments to retrieve password/port instead of the lockfile process. (see https://www.hextechdocs.dev/lol/lcuapi/6.getting-started-with-the-lcu-api#getting-the-port-number-and-the-password)
- LeagueWebSocket no longer has a
getListeners()
method, instead, thesubscriptions
property is now public.- The property is no longer an object, the implementation now uses a
Map
.
- The property is no longer an object, the implementation now uses a