Api wrapper for calling local endpoints.
Can only be used while your RiotClientServices.exe is running.
port
(REQUIRED) - stringpassword
(REQUIRED) - stringusername
(optional) - stringparseResponseData
(optional) - boolean
type LocalApiClientOptions = {
port: string;
username?: string;
password: string;
parseResponseData?: boolean;
};
const lockfile = await getLockFileData();
if (!lockfile) {
console.log("Lockfile not found!");
process.exit(1);
}
const { password, port } = lockfile;
const local = new LocalApiClient({
password,
port,
});
const {
data: { accessToken, token: entitlementsToken, subject: selfPuuid },
} = await local.getEntitlementsToken();
console.log("PUUID", selfPuuid);