Create a Client instance for a given shard.
The official Foxhole shard to use
import Foxhole from 'foxhole-client';
// Any shard
const foxhole = new Foxhole(123);
import Foxhole, { Shard } from 'foxhole-client';
// Dev branch
const foxhole = new Foxhole(Shard.Dev);
Create a Client instance for a given URL.
Optional
url: stringThe URL of the War API to use
import Foxhole from 'foxhole-client';
// Shard 1
const foxhole = new Foxhole();
import Foxhole from 'foxhole-client';
// Custom URL
const foxhole = new Foxhole('https://example.com/api');
Readonly
mapClient for accessing map data on this shard.
Readonly
urlThe base URL to use in API requests.
Readonly
warClient for accessing war data on this shard.
The main Foxhole War API client.
Example