Node.js ApexTab-API Wrapper
A simple Node.js Wrapper for the Apex Legends API provided by ApexTab.
Table of Contents
Installation
npm install apextab-api --saveyarn add apextab-apibower install apextab-api --save
Usage
const API = ;const ApexTab_API = APIApextab_API; ApexTab_API;/** * output: * Player: annouleleAid: c33e579ef0dd208b7e2ae8877a6781d5Kills:0 -- Got Stats for Player:annoulele-- Rank:0{ playerfound: true, aid: 'c33e579ef0dd208b7e2ae8877a6781d5', name: 'annoulele', platform: 'pc', skillratio: 0, visits: 3, avatar: 'https://apextab.com/cache/7372d16d41bc4f938b985c7df16a13b6.png', legend: 'Bangalore', level: 11, kills: 0, headshots: 0, matches: 0, kills_Bloodhound: 0, kills_Gibraltar: 0, kills_Lifeline: 0, kills_Pathfinder: 0, kills_Wraith: 0, kills_Bangalore: 0, kills_Caustic: 0, kills_Mirage: 0, headshots_Bloodhound: 0, headshots_Gibraltar: 0, headshots_Lifeline: 0, headshots_Pathfinder: 0, headshots_Wraith: 0, headshots_Bangalore: 0, headshots_Caustic: 0, headshots_Mirage: 0, matches_Bloodhound: 0, matches_Gibraltar: 0, matches_Lifeline: 0, matches_Pathfinder: 0, matches_Wraith: 0, matches_Bangalore: 0, matches_Caustic: 0, matches_Mirage: 0, globalrank: 0, utime: 1551305261 } * */
Documentation
Functions
All Methods are accessable through the Apextab_API-Module.
Search Player
ApexTab_API.searchPlayer(username, platform)
Returns a Promise for an Object of Type SearchResults, a List of PlayerResult.
Usage
ApexTab_API; /* output: * { "results":[ { "aid":"c33e579ef0dd208b7e2ae8877a6781d5", "name":"annoulele", "platform":"pc", "avatar":"https:\/\/apextab.com\/cache\/7372d16d41bc4f938b985c7df16a13b6.png", "legend":"Bangalore", "level":"11", "kills":"0" } ], "totalresults":1} */
Get Player
ApexTab_API.getPlayer(user_aid)
Returns a Promise for an Object of Type Player
Usage
ApexTab_API;
Types
Player
RawPlayer
PlayerSearchResult
A single Search Result:
SearchResults
The Array results stores all of the Results.
Enums
Platform
Enum which stores ID for corresponding Platform
- PC = "pc"
- PS4 = "ps4"
- XBOX_ONE = "xbl"
Legend
Enum which stores the Legends:
- Bangalore = "Bangalore",
- Bloodhound = "Bloodhound",
- Caustic = "Caustic",
- Gibraltar = "Gibraltar",
- Lifeline = "Lifeline",
- Mirage = "Mirage",
- Pathfinder = "Pathfinder",
- Wraith = "Wraith"
Contributing
Feel free to open Issues.
To run a dev build locally simply clone the repository and run npm install
in root of the project. To build use npm run build
. The TypeScript-Code will be compiled to JavaScript and put into the \lib-Folder.