UNPKG

poe-api-manager

Version:
28 lines (27 loc) 1.04 kB
import IPoeNinja from "../Interfaces/IPoeNinja"; /** * Abstract class representing a PoeNinja. * @abstract * @class * @implements {IPoeNinja} */ export default abstract class PoeNinja implements IPoeNinja { protected readonly league: string; protected readonly typeName: string; protected readonly type: string; /** * Represents a PoeNinja object. * @constructor * @param {string} league - The league name. * @param {string} typeName * @param {string} type - The type. */ constructor(league: string, typeName: string, type: string); /** * Retrieves data from the API based on the specified league, type name, and type. * @param {string} requestedProperties - Optional array of properties to include in the retrieved data. * @returns {Promise<object[]>} A promise that resolves to an array of objects containing the retrieved data. * @throws {Error} If there is an error retrieving the data. */ getData(requestedProperties?: string[]): Promise<object[]>; }