fortnite-api-io
Simple Wrapper Module for making API calls to https://fortniteapi.io.
Go to the API Docs to register for an account and to get an API key.
You can also read the module docs for a list of supported calls.
Install the Module
npm install fortnite-api-io
Require and Instantiate
const FortniteAPI = require("fortnite-api-io");
const client = new FortniteAPI("credentials-go-here", {
defaultLanguage: 'en',
ignoreWarnings: false
});
Example API Calls
The API is currently transitioning into its second version. Where available, it is highly recommended to use the version 2 endpoint.
const upcomingItems = await client.v2.listItems();
const challenges = await client.v2.listChallenges("current");
const loot = await client.getLootDetails();
If you call a version 1 method, when there is an available version 2 method, a warning log will be printed.
The deprecation warnings can be disabled when instantiating the API wrapper.
const upcomingItems = await client.listItems();
Acknowledgement
Thanks to the devs of https://fortniteapi.io, do consider subscribing on their API Dashboard to support the project and its costs.
License
MIT