Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

jonahsnider/foxhole-client.js

Repository files navigation

foxhole-client.js

npm Build Status codecov XO code style

A Foxhole War API client for the web and Node.js.

It also includes complete typings for the API (see below for more info).

import Foxhole from 'foxhole-client';

const foxhole = new Foxhole();

const warState = await foxhole.war.fetchState();

console.log(warState);

Installation

npm i foxhole-client
# or
yarn add foxhole-client
# or
pnpm i foxhole-client

Usage

import Foxhole from 'foxhole-client';

const foxhole = new Foxhole();

Please refer to the generated documentation for more detailed info.

You may also want to view the API report.

API Types

If you're using TypeScript and are just interested in the API types you can access them like so:

import type { Api } from 'foxhole-client';

const warState: Api.War.State = /* ... */;