Skip to content

Authentication Polling, Typed Requests and Client Lifecycle listener

Compare
Choose a tag to compare
@junlarsen junlarsen released this 21 Nov 02:16
· 57 commits to master since this release

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 a Response<T> whose .json() method will return a T (typescript)
  • authenticate now has options to awaitConnection, 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 to authenticate
  • 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 from authenticate no longer returns the HTTP protocol used or the process name. These can always be assumed to be "https" and "LeagueClientUx".
  • LeagueWebSocket no longer has a getListeners() method, instead, the subscriptions property is now public.
    • The property is no longer an object, the implementation now uses a Map.