JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q40277F
  • License MIT

Unofficial API Wrapper for https://fortnite-api.com/

Package Exports

  • fnapi-js
  • fnapi-js/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fnapi-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

fnapi-js

An unofficial JavaScript/Typescript wrapper for the Fortnite-API REST API.

Installation

npm install fnapi-js

Usage

// ESM
import { ApiClient, Enums } from 'fnapi-js';

// CommonJS
const { ApiClient, Enums } = require('fnapi-js');

// Initialize the client
const fnApi = new ApiClient({ apiKey: 'your-api-key' });

// Get player stats
const stats = await fnApi.stats.get(
    'username',
    Enums.accountType.epic(),
    Enums.timeWindow.lifetime(),
    Enums.statsImage.all()
);

// Search cosmetics
const searchOptions = new SearchOptions()
    .setType('outfit')
    .setRarity('epic')
    .setMatchMethod(Enums.matchMethod.contains());

const cosmetics = await fnApi.cosmetics.search(searchOptions);

// Get creator code
const creatorCode = await fnApi.sac.get('code');

// Get AES keys
const aesKeys = await fnApi.aes.get();

Check out the docs

Available Endpoints

  • Stats
    • Get player stats
    • Get stats by account ID
  • Cosmetics
    • Search cosmetics
    • Get new cosmetics
    • Get by ID
    • Get tracks, instruments, cars, LEGO items, etc.
  • Creator Codes
    • Get creator code info
  • AES
    • Get encryption keys
  • Map
    • Get current map info
  • News
    • Get game news
  • Playlists
    • Get available playlists
    • Get playlist by ID
  • Shop
    • Get current shop items
  • Banners
    • Get all available banners
    • Get all avaible banner colors

License

MIT