# call-of-duty-nodejs

> A simple wrapper to fetch public Call of Duty game stats data

Latest version **0.0.1** (published 2018-10-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install call-of-duty-nodejs
pnpm add call-of-duty-nodejs
yarn add call-of-duty-nodejs
bun add call-of-duty-nodejs
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2018-10-28 |
| First published | 2018-10-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 158.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Joshua Anderson Slate |
| Maintainers | joshuaslate |
| Keywords | typescript, call of duty, game stats |

## Links

- npm: https://www.npmjs.com/package/call-of-duty-nodejs
- Repository: https://github.com/gamepal/call-of-duty-nodejs
- Homepage: https://github.com/gamepal/call-of-duty-nodejs#readme
- Issues: https://github.com/gamepal/call-of-duty-nodejs/issues
- npm.io page: https://npm.io/package/call-of-duty-nodejs

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.2.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2018-10-28

## README

# Call of Duty Stats API Node Wrapper
A simple wrapper to fetch public Call of Duty game stats data.

Note: This is far from perfect, and not all use-cases are covered. There seem to be gaps in the data on the Call of Duty side as well. This has been developed to fit a specific, narrow use-case for the time being.

## Usage
### Installation
```bash
yarn add call-of-duty-nodejs
```

```ts
import {
  getFullStats,
  getPlayerOnLeaderboards,
  Games,
  Platforms,
  WWIILeaderboardData,
  WWIIStatData,
  } from 'call-of-duty-nodejs';

getFullStats<WWIIStatData>(Games.BlackOps3, Platforms.XBL, 'usernameHere').then(results => {
  // results here will be of type ResponseData<WWIIStatData>
});

getPlayerOnLeaderboards<WWIILeaderboardData>(Games.BlackOps3, Platforms.XBL, 'usernameHere').then(results => {
  // results here will be of type LeaderboardResponse<WWIIStatData>
});
```

Each game has different data, so pass the corresponding data interface into the data fetching functions.

| BO3 | BO4 | WWII |
|---|---|---|
| BO3LeaderboardData | BO4LeaderboardData | WWIILeaderboardData |
| BO3StatData | BO4StatData | WWIIStatData |

Please see `lib/interfaces` and `lib/constants` for more information regarding what can be passed in and expected back.

## Contributions
There is a lot of room for improvement in this library currently. Please feel free to help out and submit a pull request.

---
_Source: https://npm.io/package/call-of-duty-nodejs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
