Skip to content
Kysune edited this page Feb 6, 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`
	use_waiting_room: true, // false to ignore waiting room (epicgames load balancer)

	http: {
		// settings for lib https://github.com/request/request
	},
	
	backward_compatibility: false // Set on true if you want old-style response in methods getFriends() and lookup()

});

Properties

  • build - Desktop's launcher version
  • ue_build - Unreal Engine version
  • app_name - Application name, everytime Launcher.
  • app_xmpp_name - Application name for xmpp service.
  • account - logged account's object
    • id
    • display_name
    • first_name
    • last_name
    • email
    • age_group
    • country
    • preferred_language
    • last_login
    • failed_login_attempts

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(iso_lang_code)

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

getProfile(id_or_name)

Returns User object or false if user not found.

  • id_or_name {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(display_name)

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

  • display_name {string} - user's display name

getFriends([include_pending=false])

Returns array of your friends (Friend objects).

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

getPendingFriends()

Returns array of your pending friends.

hasFriend(id_or_name)

Verifying given account is your friend.

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

getFriendsBlocklist()

Returns array of your blacklisted friends.

blockFriend(id_or_name)

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

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

removeFriend(id_or_name)

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

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

inviteFriend(id_or_name)

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

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

acceptFriendRequest(id_or_name)

Accepting friend's invitation. Alias for method inviteFriend

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

declineFriendRequest(id_or_name)

Declining friend's invitation. Alias for method removeFriend

  • id_or_name {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