Skip to content
Kysune edited this page Feb 20, 2019 · 6 revisions

Description

Unofficial Fortnite client in javascript.

Installation

npm i epicgames-fortnite-client --save

Do you need help?

Check our discord server: https://discord.gg/HxGfuEx

Example

const EGClient = require('epicgames-client').Client;
const Fortnite = require('epicgames-fortnite-client');
const { ESubGame } = Fortnite;

let eg = new EGClient({
  email: 'EMAIL',
  password: 'PASSWORD'
});

eg.init().then(async (success) => {
  
  if(!success)
    throw new Error('Cannot initialize EpicGames launcher.');
    
  if(!await eg.login())
    throw new Error('Cannot login on EpicGames account.');
    
  const fortnite = await eg.runGame(Fortnite);
  const br = await fortnite.runSubGame(ESubGame.BattleRoyale);

  let stats = await br.getStatsForPlayer('Kysune');

  console.dir(stats);

});