(If you read it on npmjs.com - Read this file on github! Npmjs.com sometimes does not see difference between faceIt and faceit)
npm install faceit-js-api
const Faceit = require("faceit-js-api");
const faceit = new Faceit("API KEY");
To test performance:
faceit.getPlayerInfo("Player name").then(function (player) {
console.log(player);
});
Main class for performing requests
| Method | Params | Return |
|---|---|---|
| getPlayerInfo | nickname: string | Player |
| Var | Type | Description |
|---|---|---|
| faceit | Faceit | Link to main class |
| nickname | string | |
| id | string | |
| avatar | string | Url to avatar |
| steamID | string | |
| steamNickname | string | |
| faceitUrl | string | Url to faceit profile |
| raw | object | All data getted from feceit |
| games | Games | Class with games |
| Var | Type | Description |
|---|---|---|
| player | Player | |
| csgo | CSGO | Undefined if player has not ever play CS:GO |
| dota2 | Dota2 | Undefined if player has not ever play Dota 2 |
| wot_RU | WOT_RU | Undefined if player has not ever play WOT(ru) |
| Var | Type |
|---|---|
| games | Games |
| gameProfileID | string |
| gamePlayerID | string |
| region | string |
| skillLevelLabel | string |
| skillLevel | int |
| faceitElo | int |
| gamePlayerName | string |
| Method | Params | Return |
|---|---|---|
| getStats | CSGOStats |
| Var | Type |
|---|---|
| csgo | CSGO |
| raw | Object |
| winRate | string |
| currentWinStreak | string |
| longestWinStreak | string |
| wins | string |
| recentResults | string[] |
| averageHeadshots | string |
| matches | string |
| totalHeadshots | string |
| kdRatio | string |
| averageKDRatio | string |
| Var | Type |
|---|---|
| games | Games |
| gameProfileID | string |
| region | string |
| regions | Object[] |
| skillLevelLabel | string |
| gamePlayerID | string |
| skillLevel | int |
| faceitElo | int |
| gamePlayerName | string |
| Method | Params | Return |
|---|---|---|
| getStats | Dota2Stats |
| Var | Type |
|---|---|
| dota2 | Dota2 |
| raw | Object |
| currentWinStreak | string |
| goldMinute | string |
| averageKDRatio | string |
| winRate | string |
| matches | string |
| averageGoldMinute | string |
| result | string |
| recentResults | string[] |
| kdRatio | string |
| longestWinStreak | string |
| Var | Type |
|---|---|
| games | Games |
| gameProfileID | string |
| region | string |
| regions | Object[] |
| skillLevelLabel | string |
| gamePlayerID | string |
| skillLevel | int |
| faceitElo | int |
| gamePlayerName | string |
| Method | Params | Return |
|---|---|---|
| getStats | WOT_RUStats |
| Var | Type |
|---|---|
| wot_RU | WOT_RU |
| raw | Object |
| averageDamageReceived | string |
| totalDamageReceived | string |
| totalHitRatio | string |
| win | string |
| totalSurvived | string |
| totalDamageDealt | string |
| averageSurvived | string |
| currentWinningStreak | string |
| averageHitRatio | string |
| recentResults | string[] |
| longestWinStreak | string |
| totalDamageRatio | string |
| averageKills | string |
| averageDamageRatio | string |
| averageDamageDealt | string |
| winRate | string |
| matches | string |
| totalKills | string |