GithubHelp home page GithubHelp logo

capi-docs's Introduction

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

!> 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

capi-docs's People

Contributors

imgbotapp avatar lierrmm avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

darrenkeen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.