poe-api-manager
Version:
poe.ninja and poe.watch API
23 lines (22 loc) • 814 B
TypeScript
/**
* A utility class.
* @class
*/
export declare class Utils {
constructor();
/**
* Fetches the list of leagues for the game.
* @returns {string[]} The array of league names.
* @throws {Error} If there's an error fetching the leagues.
*/
getLeagues(): Promise<string[]>;
/**
* Filters properties of objects in an array based on the specified properties.
*
* @param {object[]} data - The array of objects to filter.
* @param {string[]} properties - The array of property names to include in the result.
* @returns {Promise<object[]>} - An array of objects with only the specified properties.
* @throws {Error} If there's an error filtering the properties.
*/
filterProperties(data: object[], properties: string[]): Promise<object[]>;
}