1.0.5 • Published 7 years ago
@plsdontvacmeagain/ow-api v1.0.5
ow-api
A custom Overwatch "API"
Usage
All data is returned from the main function in JSON format as a promise or a callback
Floats are returned to 2 decimal places, percentages as a float 0-1, and time as a float equal to the number of hours
The promise will be rejected if the profile cannot be found
The promise will not be resolved or rejected if a callback is provided
const owAPI = require("@plsdontvacmeagain/ow-api");
owAPI("fnatictrump-2743").then(data => {
//Do stuff here
});
Getting data with a promise
const owAPI = require("@plsdontvacmeagain/ow-api");
owAPI("fnatictrump-2743", data => {
//Do stuff here
});
Getting data with a callback
Response formatting
profile
- playerIcon
- String
- The URL of the player icon
- url
- String
- The URL of the profile
- user
- String
- The user the profile belongs to
- private
- Boolean
- Whether or not the profile is private
- level
- Integer
- The level of the user
- endorsementLevel
- Integer
- The endorsement level of the user
- rank
- Integer || null
- The SR of the user, null if the profile is private or the account is unranked
- rankIcon
- String || null
- The URL of the rank icon, null if the profile is private or the account is unranked
- gamesWon
- Integer || null
- The total games won by the user, null if the profile is private
stats
quickPlay
- Object\ || null
- Data about heroes played in quick play
- heroStats
- Object\
- Basic stats about each hero
- timePlayed
- Object\
- The number of hours played on each hero
- gamesWon
- Object\
- The number of games won as each hero
- weaponAccuracy
- Object\
- The primary fire accuracy of each hero
- eliminationsPerLife
- Object\
- The average amount of eliminations per life as each hero
- bestMultiKill
- Object\
- The best multikill as each hero
- avgObjectiveKills
- Object
- The average number of objective kills per game as each hero
- general
- Object\
- Detailed data about heroes played in quick play
- _all
- Object\
- Overall data about all heroes
competitive
- Object\ || null
- Data about heroes played in competitive
- Data is the same as quickPlay, only with a few more stats such as games played and won