Skip to content
Kysune edited this page Feb 14, 2019 · 10 revisions

Constructor options

const { Client } = require('epicgames-client');

let client = new Client({
  
  email: '',
  password: '',

  debug: null, // if you need console/file output with logs. Simple you can use `console.log`
  useWaitingRoom: true, // false to ignore waiting room (epicgames load balancer)

  http: {
    // settings for lib https://github.com/request/request
  }

});

Properties

  • build - Desktop's launcher version
  • UEBuild - Unreal Engine version
  • appName - Application name, everytime Launcher.
  • account - logged account's object
    • id
    • displayName
    • firstName
    • lastName
    • email
    • ageGroup
    • country
    • preferredLanguage
    • lastLogin
    • failedLoginAttempts

Methods

init()

Initialize client

login()

Login to an account.

logout()

Kill account's session on epicgames servers.

isID(value)

Checks if value is account's id.

  • value {string}

isDisplayName(value)

Checks if value is account's display name.

  • value {string}

getEpicDomains()

Returns array of domains using by EpicGames.

runGame(game, options)

Returns game object or false if can't run game.

  • game {object} - game library, e.g. epicgames-fortnite-client
  • options {object} (optional) - game library constructor options

setLanguage(language)

  • language {string} - e.g. en, en-US, pl, pl-PL

getProfile(user)

Returns User object or false if user not found.

  • user {string} - user's display name or id

getProfiles(arr)

Returns array of User objects.

  • arr {array} - Array with names or ids (can be mixed)

lookup(displayName)

Returns account's id, display name and extarnalAuths or false if user not found. I recommend use getProfile method.

  • displayName {string} - user's display name

getFriends([includePending=false])

Returns array of your friends (Friend objects).

  • includePending {boolean} (optional) - whether including pending friends (invite requests).

getPendingFriends()

Returns array of your pending friends.

hasFriend(user)

Verifying given account is your friend.

  • user {string} - user's display name or id

getFriendsBlocklist()

Returns array of your blacklisted friends.

blockFriend(user)

Blocking a friend. Returns Friend or false depending on whether the operation was successful.

  • user {string} - user's display name or id

removeFriend(user)

Removing a friend. Returns Friend or false depending on whether the operation was successful.

  • user {string} - user's display name or id

inviteFriend(user)

Sending a friend invite request. Returns Friend or false depending on whether the operation was successful.

  • user {string} - user's display name or id

acceptFriendRequest(user)

Accepting friend's invitation. Alias for method inviteFriend

  • user {string} - user's display name or id

declineFriendRequest(user)

Declining friend's invitation. Alias for method removeFriend

  • user {string} - user's display name or id

getLauncherInfo()

Returns object with informations about the current client (build etc.).

getLauncherStatus()

Returns "DEPRECATED" or "NOT_DEPRECATED"

Clone this wiki locally