warframe-worldstate-parser
Version:
An Open parser for Warframe's Worldstate in Javascript
87 lines (86 loc) • 2.25 kB
TypeScript
/**
* Represents a flash sale
*/
export default class FlashSale {
/**
* @param {object} data The flash sale data
* @param {Dependency} deps The dependencies object
* @param {string} deps.locale Locale to use for translations
*/
constructor(data: object, { locale }?: Dependency);
/**
* The item being offered in the flash sale
* @type {string}
*/
item: string;
/**
* The date and time at which the sale will end
* @type {Date}
*/
expiry: Date;
/**
* The date and time at which the sale will or did start
* @type {Date}
*/
activation: Date;
/**
* The item's discount percentage
* @type {number}
*/
discount: number;
/**
* The item's discounted credit price
* @type {number}
*/
regularOverride: number;
/**
* The item's discounted platinum price
* @type {number}
*/
premiumOverride: number;
/**
* Whether this item is show in the in-game market
* @type {boolean}
*/
isShownInMarket: boolean;
/**
* Whether this item is featured in the in-game market
* @type {boolean}
*/
isFeatured: boolean;
/**
* Whether this item is marked as popular in the in-game market
* @type {boolean}
*/
isPopular: boolean;
/**
* Unique identifier for this sale built from the end time and reward
* @type {string}
*/
id: string;
/**
* Whether or not this is expired (at time of object creation)
* @type {boolean}
*/
expired: boolean;
/**
* ETA string (at time of object creation)
* @type {string}
*/
eta: string;
/**
* Get how much time is left before the deal expires
* @returns {string} The time left before the deal expires
*/
getETAString(): string;
/**
* Get whether or not this deal has expired
* @returns {boolean} Whether or not the deal has expired
*/
getExpired(): boolean;
/**
* Returns a string representation of the flash sale
* @returns {string} The string representation of the flash sale
*/
toString(): string;
}