Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Pupix/lcu-connector
🔌 Streamlined LCU integration for your app.
https://github.com/Pupix/lcu-connector
Last synced: 3 months ago
JSON representation
🔌 Streamlined LCU integration for your app.
- Host: GitHub
- URL: https://github.com/Pupix/lcu-connector
- Owner: Pupix
- License: mit
- Created: 2017-12-11T00:01:50.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-23T07:20:08.000Z (12 months ago)
- Last Synced: 2024-07-18T23:27:57.277Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.2 MB
- Stars: 110
- Watchers: 6
- Forks: 26
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-league - lcu-connector - NPM Module to connect to the LCU automatically. (Developer Tools)
README
# lcu-connector
Streamlined LCU integration for your app.This connector automatically retrieves the credentials for the API that starts when the new League of Legends client is launched.
To find out more about how the new client works check out the [Riot Games engineering blog](https://engineering.riotgames.com/news/architecture-league-client-update)
For the LCU API documentation check out [Rift explorer](https://github.com/Pupix/rift-explorer)
## Download
lcu-connector is installable via:- [GitHub](https://github.com/Pupix/lcu-connector) `git clone https://github.com/Pupix/lcu-connector.git`
- [yarn](https://yarnpkg.com/): `yarn add lcu-connector`
- [npm](https://www.npmjs.com/): `npm install lcu-connector`## Usage example
```js
const LCUConnector = require('lcu-connector');
const connector = new LCUConnector();connector.on('connect', (data) => {
console.log(data);
// {
// address: '127.0.0.1'
// port: 18633,
// username: 'riot',
// password: H9y4kOYVkmjWu_5mVIg1qQ,
// protocol: 'https'
// }
});// Start listening for the LCU client
connector.start();```
## Available methods
### constructor (executablePath)
Creates a new lcu-connector.
**Parameters**
1. **[executablePath] {string}** A path to where the LeagueClient executable resides. If not passed it will be automatically figured out from the OS process list.
### start()
Starts listening for the LCU client.
### stop()
Stops the connector.
## Events
### connect
Fired when the connection to the LCU client is established
### disconnect
Fired when the connection to the LCU client is closed