@ozrageharm/epiccore
v0.1.0
Published
EpicCore is a Node.js API Wrapper created to Interact with Epic Games' API.
Downloads
2
Readme
EpicCore
EpicCore is a Node.js API Wrapper created to Interact with Epic Games' API.
> npm i @ozrageharm/epiccore
Auth Code Login example:
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}`)
})();
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)