Skip to content

darrenkeen/capi-docs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install

npm install call-of-duty-api

Usage

const API = require('call-of-duty-api')();

or

const API = require('call-of-duty-api')({ platform: "battle" });

Platforms

  • psn
  • steam
  • xbl
  • battle
  • acti
  • uno ( numerical identifier )

Login :id=login

!> Login is required to remove any restrictions on certain endpoints.

try {
    await API.login(<username>, <password>);
 } catch(Error) {
     //Handle Exception
 }

Modern Warfare

- Leaderboards :id=leaderboards

Example

try {
   let data = await API.MWLeaderboard(<page>, <platform>?);
} catch(Error) {
    //Handle Exception
}

Response

filename

- MP Match Details :id=mp-match-details

Example

try {
   let data = await API.MWcombatmp(<gamertag>, <platform>?);
} catch(Error) {
    //Handle Exception
}

Response

filename

- WZ Match Details :id=wz-match-details

Example

try {
   let data = await API.MWcombatwz(<gamertag>, <platform>?);
} catch(Error) {
    //Handle Exception
}

Response

filename

- MP Details :id=mp-details

Example

try {
   let data = await API.MWmp(<gamertag>, <platform>?);
} catch(Error) {
    //Handle Exception
}

Response

filename

- WZ Details :id=wz-details

Example

try {
   let data = await API.MWwz(<gamertag>, <platform>?);
} catch(Error) {
    //Handle Exception
}

Response

filename

- Battle Royale Information :id=br-info

Example

try {
   let data = await API.MWBattleData(<gamertag>, <platform>?);
} catch(Error) {
    //Handle Exception
}

Response

filename

- Weekly Stats :id=weekly-stats

Example

try {
   let data = await API.MWweeklystats(<gamertag>, <platform>?);
} catch(Error) {
    //Handle Exception
}

Response

filename

- Loot :id=mw-loot

Example

try {
   let data = await API.MWloot(<gamertag>, <platform>?);
} catch(Error) {
    //Handle Exception
}

Response

filename

- Analysis :id=mw-analysis

Example

try {
   let data = await API.MWAnalysis(<gamertag>, <platform>?);
} catch(Error) {
    //Handle Exception
}

Response

filename

- Map List :id=map-list

Example

try {
   let data = await API.MWMapList();
} catch(Error) {
    //Handle Exception
}

Response

filename

- Get Battle Pass :id=battle-pass-loot

Example

try {
   let data = await API.getBattlePassLoot(<season>, <platform>?);
} catch(Error) {
    //Handle Exception
}

Response

filename

- Fuzzy Search :id=fuzzy-search

!> To search all platforms, pass in 'all'

Example

 try {
    let data = await API.FuzzySearch(<text>, <platform>?);
 } catch(Error) {
     //Handle Exception
 }

Response

filename

- Get Store Loot :id=store-loot

Example

try {
   let data = await API.getPurchasable(<platform>?);
} catch(Error) {
    //Handle Exception
}

Response

filename

- Get Cod Points :id=cod-points

!> Logged in user only

Example

try {
   let data = await API.getCodPoints(<gamertag>, <platform>?);
} catch(Error) {
    //Handle Exception
}

Response

filename

- Logged In User Info :id=user-info

!> Logged in user only

Example

try {
   let data = await API.getLoggedInUserInfo();
} catch(Error) {
    //Handle Exception
}

Response

filename

- Connected Accounts :id=connected-accounts

!> Logged in user only

Example

try {
   let data = await API.ConnectedAccounts(<gamertag>, <platform>?);
} catch(Error) {
    //Handle Exception
}

Response

filename

- Event Feed :id=event-feed

!> Logged in user only

Example

try {
   let data = await API.getEventFeed();
} catch(Error) {
    //Handle Exception
}

Response

filename

- Logged In Identities :id=identities

!> Logged in user only

Example

try {
   let data = await API.getLoggedInIdentities();
} catch(Error) {
    //Handle Exception
}

Response

filename

- Account Settings :id=settings

!> Logged in user only

Example

try {
   let data = await API.Settings(<gamertag>, <platform>?);
} catch(Error) {
    //Handle Exception
}

Response

filename

Releases

No releases published

Packages

No packages published

Languages

  • HTML 53.7%
  • CSS 46.3%