Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 843 Bytes

local-api-client.md

File metadata and controls

46 lines (34 loc) · 843 Bytes

Local API Client

Api wrapper for calling local endpoints.

Can only be used while your RiotClientServices.exe is running.

Options

  • port (REQUIRED) - string
  • password (REQUIRED) - string
  • username (optional) - string
  • parseResponseData (optional) - boolean

Options Type

type LocalApiClientOptions = {
  port: string;
  username?: string;
  password: string;
  parseResponseData?: boolean;
};

Usage

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);