UNPKG

screenscraper-js

Version:
45 lines (44 loc) 1.35 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ScreenScraperJS = void 0; const game_1 = require("./game"); const search_1 = require("./search"); const systems_1 = require("./systems"); class ScreenScraperJS { devid; devpassword; ssid; sspassword; constructor({ devId, devPassword, userName, userPassword, }) { if (!devId || !devPassword) { throw new Error("devid and devpassword are required"); } this.devid = devId; this.devpassword = devPassword; this.ssid = userName; this.sspassword = userPassword; } searchGames = (params) => (0, search_1.searchGames)({ ...params, devid: this.devid, devpassword: this.devpassword, ssid: this.ssid, sspassword: this.sspassword, }); getSystems = ({ softwareName } = {}) => (0, systems_1.getSystems)({ softwareName, devid: this.devid, devpassword: this.devpassword, ssid: this.ssid, sspassword: this.sspassword, }); getGame = (params) => (0, game_1.getGame)({ ...params, devid: this.devid, devpassword: this.devpassword, ssid: this.ssid, sspassword: this.sspassword, }); } exports.ScreenScraperJS = ScreenScraperJS; exports.default = ScreenScraperJS;