@callofdutynetwork/node-api

An NPM package for accessing the Call of Duty Network API through Node.JS.

Usage no npm install needed!

<script type="module">
  import callofdutynetworkNodeApi from 'https://cdn.skypack.dev/@callofdutynetwork/node-api';
</script>

README

Call of Duty Network API Node

An NPM package for accessing the Call of Duty Network API through Node.JS.

Installation

npm i @callofdutynetwork/node-api

Usage

var CODNetworkAPI = require('@callofdutynetwork/node-api');
var api = new CODNetworkAPI("API TOKEN from https://callofduty.network");
 
// Platform, Game (currently only supports mw), Username
api.getProfile("psn", "mw", "username").then(body => {
    console.log(body.cod_data);
    console.log(body.retrieved_on);
}).catch(err => {
    console.log(err)
});