This is a package to simplify use of Wargaming API.
const { WarCord } = require('warcord')
const warcord = new WarCord('your-app-id')
World of Tanks
World of Tanks Blitz
World of WarShips
World of Tanks Console
Kind: global class
- WOTCClan
- new WOTCClan(app_id, [realm])
- .search(options) ⇒
Promise.<(Array.<WOTCClanSearch>|void)>
- .get(clan_id, options) ⇒
Promise.<(WOTCClanGet|void)>
Method returns partial list of clans in alphabetical order by clan name or tag.
Kind: instance method of WOTCClan
Returns: Promise.<(Array.<WOTCClanSearch>|void)>
- Array of clans.
Param | Type | Description |
---|---|---|
options | Object |
Options Object |
Properties
Name | Type | Default | Description |
---|---|---|---|
options.language | AcceptedLangs | string |
Localization language. | |
[options.limit] | number |
100 |
Number of returned entries (fewer can be returned, but not more than 100). If the limit sent exceeds 100, a limit of 100 is applied (by default). |
options.search | string |
Part of name or tag for clan search. Minimum 2 characters |
Method returns detailed clan information.
Kind: instance method of WOTCClan
Returns: Promise.<(WOTCClanGet|void)>
- Clan data.
Param | Type | Description |
---|---|---|
clan_id | Clan ID | |
options | Object |
Options Object |
Properties
Name | Type | Description |
---|---|---|
options.language | AcceptedLangs | string |
Localization language. |
options.members | boolean |
Return with the members info. |
Kind: global class
- WOWSClans
- new WOWSClans(app_id, [realm])
- .get(clanID) ⇒
Promise.<(WOWSClansResolve|null)>
- .search(clanNameOrTag) ⇒
Promise.<(WOWSClansSearchResolve|null)>
Get a clan in World of WarShips.
Kind: instance method of WOWSClans
Returns: Promise.<(WOWSClansResolve|null)>
- Clan data.
Param | Type | Description |
---|---|---|
clanID | number | string |
ID of clan. |
Get a array with clans data of respective name.
Kind: instance method of WOWSClans
Returns: Promise.<(WOWSClansSearchResolve|null)>
- Array with clan data.
Param | Type | Description |
---|---|---|
clanNameOrTag | string |
Name or Tag of clan. |
Kind: global class
- WOTBClan
- new WOTBClan(app_id, [realm])
- .get(clanID) ⇒
Promise.<(WOTBClanResolve|null)>
- .search(clanNameOrTag) ⇒
Promise.<(Array.<ClanSearchBlitz>|null)>
Get a clan in World of Tanks Blitz.
Kind: instance method of WOTBClan
Returns: Promise.<(WOTBClanResolve|null)>
- Clan data.
Param | Type | Description |
---|---|---|
clanID | string | number |
ID of clan. |
Example
...
const clan = await <Warcord>.blitz.clan.get('ID of Clan')
Get the ID's and Name of the putted name.
Kind: instance method of WOTBClan
Returns: Promise.<(Array.<ClanSearchBlitz>|null)>
- The clan ID's and Name.
Param | Type | Description |
---|---|---|
clanNameOrTag | string |
ID or Tag of the clan. |
Example
...
const searchingClan = await <Warcord>.blitz.clan.search('Name or Tag of Clan')
//this returns an array of the clans found
const clan = await <Warcord>.blitz.clan.get(searchingClan[0].clan_id)
//this returns the first clan data.
Kind: global class
- WOTClan
- new WOTClan(app_id, [realm])
- .get(clanID, options) ⇒
Promise.<(WOTClanResolve|null)>
- .search(clanNameOrTag, options) ⇒
Promise.<(Array.<WOTClanSearchResolve>|null)>
- .rating(clanID, options) ⇒
Object
- .member(memberID, options) ⇒
Promise.<(WOTMember|null)>
Get a clan in World of Tanks.
Kind: instance method of WOTClan
Returns: Promise.<(WOTClanResolve|null)>
- Clan data.
Param | Type | Description |
---|---|---|
clanID | string |
ID of clan. |
options | Object |
Options Object. |
Properties
Name | Type | Description |
---|---|---|
options.realm | AllRealms |
The realm of query. |
Example
...
const clan = await <Warcord>.wot.clan.get('ID of Clan')
Get a array with clans data of respective name.
Kind: instance method of WOTClan
Returns: Promise.<(Array.<WOTClanSearchResolve>|null)>
- Array with clan data.
Param | Type | Description |
---|---|---|
clanNameOrTag | string |
Name or Tag of clan. |
options | Object |
Options Object. |
Properties
Name | Type | Description |
---|---|---|
options.realm | AllRealms |
The realm of query. |
Example
...
const searchingClan = await <Warcord>.wot.clan.search('Name or Tag of Clan')
//this returns an array of the clans found.
const clan = await <Warcord>.wot.clan.get(searchingClan[0].clan_id)
//this returns the first clan data.
Get the rating of an Clan.
Kind: instance method of WOTClan
Returns: Object
- Clan rating.
Param | Type | Description |
---|---|---|
clanID | string | number |
ID of Clan. |
options | Object |
Options Object. |
Properties
Name | Type | Description |
---|---|---|
options.realm | AllRealms |
The realm of query. |
Example
...
const ratingOfClan = await <Warcord>.wot.clan.rating('ID of Clan')
Get the clan member data.
Kind: instance method of WOTClan
Returns: Promise.<(WOTMember|null)>
- Clan Member data.
Param | Type | Description |
---|---|---|
memberID | string | number |
ID of Clan Member. |
options | Object |
Options Object. |
Properties
Name | Type | Description |
---|---|---|
options.realm | AllRealms |
The realm of query. |
Example
const memberOfClan = await <Warcord>.wot.clan.member('ID of Member')
Kind: global class
- WOWSEncyclopedia
- new WOWSEncyclopedia(app_id, [realm])
.get()- .find(ops) ⇒
Promise.<(Array.<WOWSLongPediaResolve>|Array.<WOWSPediaResolve>|null)>
- .shipParams(ship_id, options) ⇒
Promise.<(WOWSShipParams|null)>
Deprecated
Kind: instance method of WOWSEncyclopedia
Get a ship based on params.
Kind: instance method of WOWSEncyclopedia
Param | Type |
---|---|
ops | object |
Properties
Name | Type | Default | Description |
---|---|---|---|
ops.nation | string |
The nation of ship. | |
ops.type | string |
The type of ship. | |
ops.options | object |
Options of query. | |
[ops.options.limit] | number |
100 |
The limit of ships finded. |
[ops.options.lang] | string |
"en" |
The Language of Texts. |
Example
...
const getShip = await <WarCord>.wows.ship.find({ nation: 'japan', options: { lang: 'pt-br', limit: 100 } })
Get the parameters of a ship
Kind: instance method of WOWSEncyclopedia
Returns: Promise.<(WOWSShipParams|null)>
- Parameters of ships in all existing configurations.
Param | Type | Description |
---|---|---|
ship_id | Ship ID | |
options | Object |
Options Object |
Properties
Name | Type | Default | Description |
---|---|---|---|
options.artillery_id | string | number |
Main Battery ID. If the module is not indicated, module of basic configuration is used. | |
options.dive_bomber_id | string | number |
Dive bombers' ID. If the module is not indicated, module of basic configuration is used. | |
options.engine_id | string | number |
Engine ID. If the module is not indicated, module of basic configuration is used. | |
options.fighter_id | string | number |
Fighters' ID. If the module is not indicated, module of basic configuration is used. | |
options.fire_control_id | string | number |
ID of Gun Fire Control System. If the module is not indicated, module of basic configuration is used. | |
options.flight_control_id | string | number |
ID of Flight Control System. If the module is not indicated, module of basic configuration is used. | |
options.hull_id | string | number |
Hull ID. If the module is not indicated, module of basic configuration is used. | |
[options.language] | string | number |
"en" |
Localization language. |
options.torpedo_bomber_id | string | number |
Torpedo bombers' ID. If the module is not indicated, module of basic configuration is used. | |
options.torpedoes_id | string | number |
Torpedo tubes' ID. If the module is not indicated, module of basic configuration is used. |
Kind: global class
- WOWSShip
- new WOWSShip(app_id, [realm])
- .get(userID) ⇒
Promise.<(Array.<WOWSShipResolve>|null)>
- .find(ops) ⇒
Promise.<(Array.<WOWSLongShipResolve>|Array.<WOWSShipResolve>|null)>
Get the ships status of an user.
Kind: instance method of WOWSShip
Param | Type | Description |
---|---|---|
userID | string |
the ID of user. |
Get a ship based on params.
Kind: instance method of WOWSShip
Param | Type |
---|---|
ops | Object |
Properties
Name | Type | Default | Description |
---|---|---|---|
ops.nation | string |
The nation of ship. | |
ops.string | string |
The type of ship. | |
ops.options | Object |
Options of query. | |
[ops.options.limit] | number |
100 |
The limit of ships finded. |
[ops.options.lang] | string |
"en" |
The Language of Texts. |
Kind: global class
- WOTBTank
- new WOTBTank(app_id, [realm])
- .get(tankID) ⇒
Promise.<(WOTBTankResolve|null)>
Get the tank by ID.
Kind: instance method of WOTBTank
Param | Type |
---|---|
tankID | string | number |
Kind: global class
- WOTTank
- new WOTTank(app_id, [realm])
- .find(type, nation, tier, options) ⇒
Promise.<(WOTTanksResolve|null)>
- .get(tankID) ⇒
Promise.<(WOTTanksResolve|null)>
Get all tanks of parameters.
Kind: instance method of WOTTank
Returns: Promise.<(WOTTanksResolve|null)>
- Returns all tanks finded.
Exemple: ...
const getTank = await .wot.tank.find('heavyTank')
Param | Type | Description |
---|---|---|
type | string |
type of tank. |
nation | WOTNations |
The nation of tank. |
tier | string |
The tier of tank. |
options | Object |
The options object. |
Properties
Name | Type | Default | Description |
---|---|---|---|
options.realm | AllRealms |
The realm of query. | |
[options.limit] | number |
100 |
Limit of returned data. |
[options.lang] | WOTLangs |
en |
The language of Texts. |
Get a tank by ID.
Kind: instance method of WOTTank
Returns: Promise.<(WOTTanksResolve|null)>
- Object with Tank Data.
Param | Type | Description |
---|---|---|
tankID | number | string |
ID of Tank. |
Example
...
const tank = await <WarCord>.wot.tank.get('ID of Tank')
Kind: global class
- WOTCTankopedia
- new WOTCTankopedia(app_id, [realm])
- .search(options) ⇒
Promise.<(Array.<WOTCTank>|void)>
Method returns list of available vehicles.
Kind: instance method of WOTCTankopedia
Returns: Promise.<(Array.<WOTCTank>|void)>
- An array with search data.
Param | Description |
---|---|
options | Options Object |
Properties
Name | Type | Description |
---|---|---|
options.language | AcceptedLangs | Array.<AcceptedLangs> |
Localization language. |
options.nation | AcceptedNations | Array.<AcceptedNations> |
Nation. |
options.tank_id | number | Array.<number> |
Vehicle ID. |
options.tier | number | Array.<number> |
Tier. |
Kind: global class
- WOTBTournaments
- new WOTBTournaments(app_id, [realm])
- .find(options) ⇒
Promise.<(Array.<WOTBTournamentsSearch>|null)>
- .get(tourID, options) ⇒
Promise.<(WOTBTournamentsGet|null)>
- .getResult(tourID, options) ⇒
Promise.<(WOTBTourResult|null)>
Param | Type | Default | Description |
---|---|---|---|
app_id | string |
The ID of your WarGaming App. | |
[realm] | string |
"na" |
Server Location Not valid for World of Tanks Console (WOTC).. |
Search tournaments in API.
Kind: instance method of WOTBTournaments
Returns: Promise.<(Array.<WOTBTournamentsSearch>|null)>
- The search data.
Param | Type | Description |
---|---|---|
options | Object |
Options Object |
Properties
Name | Type | Default | Description |
---|---|---|---|
[options.language] | AcceptedLanguagesWOTBTournaments | string |
"en" |
Localization language. |
[options.limit] | number |
10 |
Number of returned entries. Min value is 1. Maximum value: 25. |
options.search | string |
First letters in tournament name for search. Minimum length: 2 characters. Maximum length: 50 characters. | |
options.status | StautsTournaments | Array.<StautsTournaments> |
Tournament status. |
Get a tournamente by ID.
Kind: instance method of WOTBTournaments
Returns: Promise.<(WOTBTournamentsGet|null)>
- The tournament data.
Param | Type | Description |
---|---|---|
tourID | string |
Tournament ID that can be retrieved from the find method. |
options | Object |
The Options Object |
Properties
Name | Type | Description |
---|---|---|
options.language | AcceptedLanguagesWOTBTournaments | string |
Localization language. |
Used to get the tournament result.
Kind: instance method of WOTBTournaments
Returns: Promise.<(WOTBTourResult|null)>
- Tournament Result.
Param | Type | Description |
---|---|---|
tourID | Tournament ID that can be retrieved from the find method. | |
options | Object |
Options Object |
Properties
Name | Type | Default | Description |
---|---|---|---|
language | AcceptedLanguagesWOTBTournaments |
Localization language. | |
[limit] | number |
10 |
Number of returned entries. |
team_id | string |
Team ID. |
Kind: global class
- WOWSUser
- new WOWSUser(app_id, [realm])
- .search(userName) ⇒
Promise.<(Array.<UserSearchResolve>|null)>
- .get(userID) ⇒
Promise.<(WOWSUserResolve|null)>
- .achievements(account_id, options) ⇒
Promise.<({battle: any, progress: any}|null)>
- .shipStats(account_id) ⇒
Promise.<(Array.<WOWSPediaResolve>|null)>
Param | Type | Default | Description |
---|---|---|---|
app_id | string |
The ID of your WarGaming App. | |
[realm] | string |
"na" |
Server Location Not valid for World of Tanks Console (WOTC).. |
Search users with respective name.
Kind: instance method of WOWSUser
Returns: Promise.<(Array.<UserSearchResolve>|null)>
- Object Array with users data.
Param | Type | Description |
---|---|---|
userName | string |
Name of user. |
Get an user by ID.
Kind: instance method of WOWSUser
Returns: Promise.<(WOWSUserResolve|null)>
- Object of user data.
Param | Type | Description |
---|---|---|
userID | number | string |
ID of user. |
Get all achievements of an user.
Kind: instance method of WOWSUser
Returns: Promise.<({battle: any, progress: any}|null)>
- The achievements of user.
Param | Type | Description |
---|---|---|
account_id | Player account ID. | |
options | Object |
Options Object |
Properties
Name | Type | Description |
---|---|---|
options.language | AcceptedLangs |
Localization language. |
Get the ships status of an user.
Kind: instance method of WOWSUser
Param | Type | Description |
---|---|---|
account_id | string |
the ID of user. |
Example
...
const ships = await <Warcord>.wows.user.shipStats('ID of User')
Kind: global class
- WOTBUser
- new WOTBUser(app_id, [realm])
- .get(userID) ⇒
Promise.<(WOTBUserResolve|null)>
- .search(userName) ⇒
Promise.<(UserSearchResolve|null)>
- .topTanks(userID) ⇒
Promise.<(WOTBTankTop|null)>
Get the user data by ID.
Kind: instance method of WOTBUser
Param | Type |
---|---|
userID | string | number |
Example
...
const user = await <Warcord>.blitz.user.get('Wargaming ID of User')
Get all users with the putted name.
Kind: instance method of WOTBUser
Param | Type |
---|---|
userName | string |
Example
...
const searchingUser = await <Warcord>.blitz.user.search('Wargaming NickName of User')
//this returns an array of the users found.
const user = await <Warcord>.blitz.user.get(searchingUser[0].id)
//this returns the first user data.
Get the best 5 tanks of an user.
Kind: instance method of WOTBUser
Param | Type |
---|---|
userID | string | number |
Example
...
const tank = await <Warcord>.blitz.user.topTanks('Wargaming ID of User')
Kind: global class
- WOTUser
- new WOTUser(app_id, [realm])
- .search(userName, options) ⇒
Promise.<(Array.<UserSearchResolve>|null)>
- .get(userID, options) ⇒
Promise.<(WOTUserResolve|null)>
- .topTanks(userID, options) ⇒
Promise.<(Array.<WOTTopTanksResolve>|null)>
Search users with respective name.
Kind: instance method of WOTUser
Returns: Promise.<(Array.<UserSearchResolve>|null)>
- Object Array with users data.
Param | Type | Description |
---|---|---|
userName | string |
Name of user. |
options | Object |
Options Object. |
Properties
Name | Type | Description |
---|---|---|
options.realm | AllRealms |
The realm of query. |
Example
...
const searchingUser = await <Warcord>.wot.user.search('Wargaming NickName of User')
//this returns an array of the users found.
const user = await <Warcord>.wot.user.get(searchingUser[0].id)
//this returns the first user data.
Get an user by ID.
Kind: instance method of WOTUser
Returns: Promise.<(WOTUserResolve|null)>
- Object of user data.
Param | Type | Description |
---|---|---|
userID | number | string |
ID of user. |
options | Object |
Options Object. |
Properties
Name | Type | Description |
---|---|---|
options.realm | AllRealms |
The realm of query. |
Example
...
const user = await <Warcord>.wot.user.get('Wargaming ID of User')
Get the 5 best tanks of user.
Kind: instance method of WOTUser
Returns: Promise.<(Array.<WOTTopTanksResolve>|null)>
- Object Array with tanks data.
Param | Type | Description |
---|---|---|
userID | number | string |
ID of user. |
options | Object |
Options Object. |
Properties
Name | Type | Description |
---|---|---|
options.realm | AllRealms |
The realm of query. |
Example
...
const topTanks = await <Warcord>.wot.user.topTanks('Wargaming ID of User')