@ozrageharm/epiccore
v1.0.1
Published
EpicCore is a Node.js API Wrapper created to Interact with Epic Games' API.
Readme
EpicCore
EpicCore is a Node.js API Wrapper created to Interact with Epic Games' API.
Installation:
> npm i @ozrageharm/epiccore@latestDocumentation can be found here
Auth Code Login example:
Get an auth code here by logging in.
const epiccore = require('@ozrageharm/epiccore');
(async () => {
const authCode = "your-auth-code-here"
const auth = await epiccore.login({ method: "code", value: authCode });
console.log(`Logged in as: ${auth.displayName}`)
})();Listing all available client tokens
const epiccore = require('@ozrageharm/epiccore');
(async () => {
try {
console.log(epiccore.clientTokens)
} catch (error) {
console.error("An error occurred:", error);
}
})();Getting Playlist Data
const { getPlaylist, getAllPlaylists } = require('@ozrageharm/epiccore');
const playlist_id = "playlist-id-here";
const playlist = getPlaylist(playlist_id);
const playlists = getAllPlaylists();
console.log(playlist, playlists)Getting Cosmetic Data
const { getCosmetic, getPath } = require('@ozrageharm/epiccore');
// Cosmetic name and type are required for searching by name, but are not required for searching by id
const cosmetic = getCosmetic("cosmetic-name (optional)", "cosmetic-type (optional)", "cosmetic-id (optional)")
const path = getPath(cosmetic.path)
console.log(cosmetic, path)Getting Player Stats By Username and Account Id
const { getStatsByName, getStatsById } = require('@ozrageharm/epiccore');
const apiKey = "api-key" // fortnite-api.com api key
const acc_by_name = getStatsByName("acc-username", apiKey)
const acc_by_id = getStatsById("acc-id", apiKey)
console.log(acc_by_name, acc_by_id)