poe-api-manager
Version:
poe.ninja and poe.watch API
25 lines (24 loc) • 989 B
TypeScript
import IPoeWatch from "../Interfaces/IPoeWatch";
/**
* Represents an abstract class for interacting with the PoeWatch API.
* @abstract
* @class
* @implements {IPoeWatch}
*/
export default abstract class PoeWatch implements IPoeWatch {
protected readonly league: string;
protected readonly type: string;
/**
* Creates a new instance of PoeWatch.
* @param {string} league - The league name to get data from.
* @param {string} type - The type of data to retrieve (e.g. 'currency', 'items', etc.).
*/
constructor(league: string, type: string);
/**
* Retrieves data from the PoeWatch API.
* @param {string[]} requestedProperties Optional array of properties to include in the response.
* @returns {Promise<object[]>} A promise that resolves to an array of objects containing the requested data.
* @throws {Error} If there is an error retrieving the data.
*/
getData(requestedProperties?: string[]): Promise<object[]>;
}