gwent-pro-ladder-lib
v1.0.3
Published
Small library to request gwent pro ladder stats as json
Downloads
2
Readme
Gwent Pro-Ladder LIB
Gwent pro ladder LIB is a library that allows to request current pro ladder ranking statistics in an easy to parse JSON format.
Installation
For installation, you must have nodejs and yarn installed. You can setup the project by doing:
yarn add gwent-pro-ladder-lib
That's it!
Usage
You can request the data for the first N players on the pro ladder by invoking the only available method :
import gwent from "gwent-pro-ladder-lib";
//request first 1 player from the ladder
gwent.get_ladder_players(1).then((ladder)=>
{
console.log(JSON.stringify({ladder}));
}).catch((error)=>
{
console.log(error);
});
it will give you an array that can be serialised to json :
[
{
"player": "Adzikov",
"country": {
"iso": "pl",
"name": "Poland"
},
"mmr": 5426,
"total_matches": 457,
"factions": [
{
"faction": "Nilfgaard",
"peak_mmr": 1330,
"current_mmr": 1330,
"real_mmr": 1330,
"matches": 100
},
{
"faction": "Scoia'tael",
"peak_mmr": 1356,
"current_mmr": 1356,
"real_mmr": 1356,
"matches": 102
},
{
"faction": "Northern Realms",
"peak_mmr": 1353,
"current_mmr": 1353,
"real_mmr": 1353,
"matches": 155
},
{
"faction": "Skellige",
"peak_mmr": 0,
"current_mmr": 0,
"real_mmr": 0,
"matches": 0
},
{
"faction": "Monsters",
"peak_mmr": 1387,
"current_mmr": 1387,
"real_mmr": 1387,
"matches": 100
}
]
}
]
Licence
Gwebt Pro-Ladder LIB uses the MIT License :
Copyright 2017 ecyrbe
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.