All Projects → jakejrichards → cod-api

jakejrichards / cod-api

Licence: MIT license
A thin Call of Duty API wrapper written in TypeScript

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to cod-api

CallofDuty.py
Asynchronous, object-oriented Python wrapper for the Call of Duty API.
Stars: ✭ 86 (+115%)
Mutual labels:  cod, call-of-duty, callofduty, wwii
piw5 bot warfare
The Bot Warfare mod for PlutoniumIW5
Stars: ✭ 57 (+42.5%)
Mutual labels:  gaming, cod, call-of-duty, callofduty
iw6x-client
Modification for IW6
Stars: ✭ 178 (+345%)
Mutual labels:  cod, call-of-duty, callofduty
Jekyll
Call of Duty XAsset exporter that dumps raw assets from a game's memory.
Stars: ✭ 29 (-27.5%)
Mutual labels:  cod, call-of-duty, wwii
Nerf-Gun-Call-of-Duty-Warzone-Controller
DIY Call of Duty Warzone controller built using a nerf gun powered by the Raspberry Pi 4.
Stars: ✭ 18 (-55%)
Mutual labels:  gaming, cod, call-of-duty
zonetool
zonetool, a fastfile linker for various Call of Duty titles.
Stars: ✭ 98 (+145%)
Mutual labels:  cod, call-of-duty, callofduty
The Forge
The Forge Cross-Platform Rendering Framework PC Windows, Linux, Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2
Stars: ✭ 2,710 (+6675%)
Mutual labels:  xbox, ps4
SteamAchievementNotifier
Steam Achievement Notifier is an Electron application that shows a customisable notification when you unlock any Steam Achievement! It uses the Steam Web API to track achievement stats in real time, and displays an achievement summary within the notification.
Stars: ✭ 77 (+92.5%)
Mutual labels:  xbox, playstation
open-iw5
Experimental MW3 singleplayer & multiplayer client
Stars: ✭ 59 (+47.5%)
Mutual labels:  cod, call-of-duty
FCommunity
multi Checkers (Hma/Hulu/Spotify/Call of duty/Instagram/smtp2go/VyprVpn) in One Tool Named FCommunity
Stars: ✭ 26 (-35%)
Mutual labels:  cod, call-of-duty
f1-telemetry-client
A Node UDP client and telemetry parser for Codemaster's Formula 1 series of games
Stars: ✭ 128 (+220%)
Mutual labels:  xbox, playstation
Hyde
Call of Duty XAsset compiler that transforms raw assets into digestible data.
Stars: ✭ 15 (-62.5%)
Mutual labels:  cod, call-of-duty
blender-cod
Blender Add-On for Call of Duty® modding
Stars: ✭ 53 (+32.5%)
Mutual labels:  cod, call-of-duty
Pancake
Lightweight, Fast, Easy-to-use HTML5 2D game framework!
Stars: ✭ 79 (+97.5%)
Mutual labels:  xbox, playstation
AUTOBOT FIFAX
FIFA SNIPING BOT
Stars: ✭ 31 (-22.5%)
Mutual labels:  xbox, playstation
brackets-viewer.js
A simple library to display tournament brackets (round-robin, single elimination, double elimination).
Stars: ✭ 52 (+30%)
Mutual labels:  gaming, esports
Gopher360
Gopher360 is a free zero-config app that instantly turns your Xbox 360, Xbox One, or even DualShock controller into a mouse and keyboard. Just download, run, and relax.
Stars: ✭ 566 (+1315%)
Mutual labels:  gaming, xbox
xcloud-shield
Xcloud Beta Unofficial App for the Nvidia Shield Android TV. Playing Xbox Cloud Gaming directly on the box Nvidia Shield tv in the best way.
Stars: ✭ 93 (+132.5%)
Mutual labels:  gaming, xbox
Uwphook
🔗 Add your Windows Store or UWP games to Steam
Stars: ✭ 566 (+1315%)
Mutual labels:  gaming, xbox
Cloudrig
Stream your applications with Parsec and AWS on the cheap.
Stars: ✭ 151 (+277.5%)
Mutual labels:  gaming

cod-api

A thin Call of Duty API wrapper written in TypeScript

Not licensed by or affiliated with Activision or Call of Duty

  • Full Black Ops 4 Support - blackout, mp, zombies
  • Get profile information - prestige, rank, xp, and more...
  • Get recent matches and stats - map, mode, win/loss, kills, deaths, SPM, K/D Ratio, and more...
  • Get leaderboard information - weekly, monthly, alltime, for all game modes

Installing

You can install via the npm package manager

npm i cod-api

Or clone the repository and install dependencies

git clone https://github.com/jakejrichards/cod-api.git

Black Ops 4

import { BO4 } from 'cod-api'

const username = 'Consisttt'; // username
const platform = 'psn'; // psn | xbl | battle

// Retrieve Raw Responses

BO4.getRawMultiplayerStats(username, platform)
    .then(multiplayerStats => {
        
    });

BO4.getRawBlackoutStats(username, platform)
    .then(blackoutStats => {
    
    });

BO4.getRawZombiesStats(username, platform)
    .then(zombiesStats => {
       
    });

const start = new Date(/*start time*/);
const end = new Date(/*end time*/);

BO4.getRawMultiplayerMatchesStats({ username, platform, start, end })
    .then(matchesStats => {
        
    });

BO4.getRawZombiesMatchesStats({ username, platform, start, end })
    .then(matchesStats => {
        
    });

BO4.getRawBlackoutMatchesStats({ username, platform, start, end })
    .then(matchesStats => {
        
    });

// Specific Methods

BO4.getLifetimeMultiplayerStats(username, platform)
    .then(lifetime => {
        const totalKills = data.all.kills;
    });

BO4.getWeeklyMultiplayerStats(username, platform)
    .then(weekly => {
        const weeklyWins = data.all.wins;
    });

BO4.getOverallZombiesStats(username, platform)
    .then(data => {
        const totalKills = data.kills;
    });

BO4.getOverallBlackoutStats(username, platform)
    .then(data => {
        const blackoutWins = data.wins;
    });

BO4.getMultiplayerMatchesStats({ username, platform, start, end })
    .then(matches => {
        const [ match ] = matches;
    })

BO4.getBlackoutMatchesStats({ username, platform, start, end })
    .then(matches => {
        const [ match ] = matches;
    })

BO4.getZombiesMatchesStats({ username, platform, start, end })
    .then(matches => {
        const [ match ] = matches;
    })

These endpoints are not yet populated with data on the official call of duty api:

  • getSoloBlackoutStats
  • getDuoBlackoutStats
  • getQuadBlackoutStats

Legacy COD Titles

Methods for titles released before Black Ops 4

Get Profile

import { LegacyCOD } from 'cod-api';

LegacyCOD.getProfile({ title, platform, username })
    .then(response => {
        // Do something...
        console.log(response);
    })
    .catch(err => {
        // Do something with this error
        console.log(err);
    });

Sample Output:

{ title: 'wwii',
platform: 'psn',
username: 'Consisttt',
mp: 
{ lifetime: { all: [Object], mode: [Object] },
    weekly: { all: [Object], mode: [Object] },
    level: 42,
    maxLevel: 0,
    levelXpRemainder: 26990,
    levelXpGained: 13010,
    prestige: 5,
    prestigeId: 0,
    maxPrestige: 0 },
zombies: 
{ lifetime: { all: {}, mode: {} },
    weekly: { all: {}, mode: {} } },
engagement: null }

Get Recent Matches

import { LegacyCOD } from 'cod-api';

LegacyCOD.getRecentMatches({ title, platform, username, days })
    .then(response => {
        // Do something...
        console.log(response);
    })
    .catch(err => {
        // Do something with this error
        console.log(err);
    });

Sample Output:

[ { utcStartSeconds: 1518474308,
    utcEndSeconds: 1518474994,
    duration: 685,
    map: 'mp_france_village',
    mode: 'hp',
    result: 'none',
    winningTeam: 'allies',
    privateMatch: false,
    gameBattle: false,
    playlistName: null,
    player: 
    { awards: [Object],
    team: 'axis',
    rank: 41,
    prestige: 5,
    loadouts: [Object]
    },
    playerStats: 
    { kills: 0,
    shotsMissed: 634,
    kdRatio: 0,
    distanceTravelled: 90335.734375,
    divisionXpMountain: 0,
    accuracy: 0.25323910482921086,
    divisionXpExpeditionary: 0,
    divisionXpInfantry: 0,
    divisionXpArmored: 0,
    shotsLanded: 215,
    divisionXpAirborne: 0,
    avgSpeed: 174.0572967529297,
    avgKillDistance: 465.7652587890625,
    score: 6900,
    totalXp: 4000,
    timePlayed: 685.9,
    headshots: 0,
    divisionXpNone: 0,
    assists: 10,
    divisionXpResistance: 0,
    shotsFired: 849,
    deaths: 0
    }
}
]

Get Summary

import { LegacyCOD } from 'cod-api';

LegacyCOD.getRecentSummary({ title, platform, username, days })
    .then(response => {
        // Do something...
        console.log(response);
    })
    .catch(err => {
        // Do something with this error
        console.log(err);
    });

Sample Output:

{ all: 
{ kills: 88,
    distanceTravelled: 529676.67578125,
    divisionXpMountain: 0,
    accuracy: 0.255205688166582,
    divisionXpExpeditionary: 0,
    losses: 1,
    shotsLanded: 1005,
    score: 30885,
    totalXp: 85200,
    headshots: 5,
    assists: 52,
    divisionXpResistance: 4275,
    scorePerMinute: 194.1486157311611,
    deaths: 50,
    wins: 4,
    shotsMissed: 2933,
    kdRatio: 1.76,
    divisionXpInfantry: 0,
    divisionXpArmored: 0,
    divisionXpAirborne: 0,
    avgSpeed: 1541.1485290527344,
    avgKillDistance: 4201.184417724609,
    timePlayed: 9544.75,
    matchesPlayed: 12,
    divisionXpNone: 0,
    shotsFired: 3938
}
}

Get Leaderboards

import { LegacyCOD } from 'cod-api';

LegacyCOD.getLeaderboards({ title, platform, time, type, mode, username })
    .then(response => {
        // Do something...
        console.log(response);
    })
    .catch(err => {
        // Do something with this error
        console.log(err);
    });

Sample Output:

{ title: 'wwii',
platform: 'psn',
leaderboardType: 'core',
gameMode: 'war',
page: 3969,
resultsRequested: 20,
totalPages: 288978,
sort: null,
columns: 
[ 'prestige',
    'totalXp',
    'kills',
    'deaths',
    'assists',
    'score',
    'timePlayed' ],
entries: 
[ { rank: 79361,
    username: 'itsESPALDINHO79',
    updateTime: 294760,
    rating: 5972,
    values: [Object] },
    { rank: 79380,
    username: 'Consisttt',
    updateTime: 7900,
    rating: 5972,
    values: [Object] } ] }

License

This project is licensed under the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].