UNPKG

zhonya

Version:

A simple and typed League of Legends API wrapper for Node.js

16 lines 590 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getLastVersion = getLastVersion; const axios_1 = require("axios"); const ZhonyaError_1 = require("./errors/ZhonyaError"); async function getLastVersion() { try { const response = await axios_1.default.get(`https://ddragon.leagueoflegends.com/api/versions.json`); const versions = response.data; return versions[0]; } catch (error) { throw new ZhonyaError_1.ZhonyaError("Error while fetching the latest version", error); } } //# sourceMappingURL=utils.js.map