bun-fortnite-android-game-client
v1.0.3
Published
`bun-fortnite-android-game-client` creates a basic `FortniteAndroidGameClient` client, handling authentication with `FortniteAndroidGameClient.login()`. Subsequent `FortniteAndroidGameClient.fetch()` calls will automatically assign the correct `Authorizat
Maintainers
Keywords
Readme
bun-fortnite-android-game-client creates a basic FortniteAndroidGameClient client, handling
authentication with FortniteAndroidGameClient.login(). Subsequent
FortniteAndroidGameClient.fetch() calls will automatically assign the correct Authorization and
User-Agent headers.
Installation
bun add bun-fortnite-android-game-clientExample
import FortniteAndroidGameClient from 'bun-fortnite-android-game-client';
// Create a FortniteAndroidGameClient client…
const fortniteAndroidGameClient = new FortniteAndroidGameClient();
// Login with the FortniteAndroidGameClient client using a DeviceAuth…
await fortniteAndroidGameClient.login({
account_id: '…',
device_id: '…',
secret: '…',
});
// Request an ExchangeCode with the FortniteAndroidGameClient client…
const exchangeCode = await fortniteAndroidGameClient
.fetch('https://account-public-service-prod.ol.epicgames.com/account/api/oauth/exchange')
.then((response) => response.json());
// Log the results…
console.dir(exchangeCode, { depth: Infinity });