UNPKG

rl-loadout-lib

Version:

Load Rocket League assets into three.js

39 lines 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const network_1 = require("../utils/network"); const HOST_PROD = 'https://rocket-loadout.com'; const PATH_V1 = '/api/v1'; /** * Service for interacting with the rocket loadout backend. */ class RocketLoadoutService { constructor(host) { if (host == undefined) { host = HOST_PROD; } this.baseUrl = `${host}${PATH_V1}`; } /** * GET the body at <host>/bodies/<id>. * @param id in-game body id */ getBody(id) { return network_1.doRequest(`${this.baseUrl}/bodies/${id}`); } /** * GET the wheel at <host>/wheels/<id>. * @param id in-game wheel id */ getWheel(id) { return network_1.doRequest(`${this.baseUrl}/wheels/${id}`); } /** * GET the decal at <host>/decals/<id>. * @param id in-game decal id */ getDecal(id) { return network_1.doRequest(`${this.baseUrl}/decals/${id}`); } } exports.RocketLoadoutService = RocketLoadoutService; //# sourceMappingURL=rl-service.js.map