Skip to content

NexBL/fnapi-js2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

An unofficial JavaScript/TypeScript wrapper for the Fortnite-API REST API

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%