1.0.8 • Published 3 years ago

warzone-api v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

warzone-api-wrapper

A JS wrapper for the CoD Warzone API

npm install warzone-api
const WarzoneAPI = require('warzone-api')

const api = WarzoneAPI();

//Using async await 
const getPlayerStats = async (platform, username) => {
  await api.login('valid activision email', 'valid activision password');
  const response = await api.getStats(platform, username);
  
  return response;
}

//Promise chaining
api.login('valid activision email', 'valid activision password')
.then(() => {
  return api.getStats('psn', 'Bojo704')
}).then((response) => {
  console.log(response)
});
api.login('valid activision email', 'valid activision password').then(() => //do something);
api.getMatchDetails('match id').then((json) => //do something);
//Available options for the platform argument are battle, psn, or xbl
api.searchPlayer('platform', 'username').then((json) => //do something);
//Available options for the platform argument are battle, psn, or xbl
api.getStats('platform', 'username').then((json) => //do something);
//Available options for the platform argument are battle, psn, or xbl
api.getMatches('platform', 'username').then((json) => //do something);
1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago