@blizzard-api/classic-wow
Version:
A series of helpers to interact with the World of Warcraft Classic Blizzard API
46 lines (45 loc) • 2.07 kB
TypeScript
import { BlizzardNamespaces, Href, NameId, NameIdKey, Resource, ResponseBase } from "@blizzard-api/core";
//#region src/auction-house/types.d.ts
interface AuctionHouseIndexResponse extends ResponseBase {
auctions: Array<NameIdKey>;
}
interface AuctionsResponse extends NameId, ResponseBase {
auctions: Array<Auction>;
connected_realm: Href;
}
interface Auction {
bid: number;
buyout: number;
id: number;
item: {
id: number;
rand?: number;
seed?: number;
};
quantity: number;
time_left: 'LONG' | 'MEDIUM' | 'SHORT' | 'VERY_LONG';
}
//#endregion
//#region src/auction-house/index.d.ts
/**
* Returns an index of auction houses for a connected realm.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @param connectedRealmId The ID of the connected realm.
* @returns The auction house index. See {@link AuctionHouseIndexResponse}.
*/
declare function auctionHouseIndex(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>, connectedRealmId: number): Resource<AuctionHouseIndexResponse>;
/**
* Returns all active auctions for a specific auction house on a connected realm.
*
* Auction house data updates at a set interval. The value was initially set at 1 hour; however, it might change over time without notice.
*
* Depending on the number of active auctions on the specified connected realm, the response from this endpoint may be rather large, sometimes exceeding 10 MB.
* @param namespace The namespace to use. See {@link BlizzardNamespaces}.
* @param connectedRealmId The ID of the connected realm.
* @param auctionHouseId The ID of the auction house.
* @returns The auction house data. See {@link AuctionsResponse}.
*/
declare function auctions(namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>, connectedRealmId: number, auctionHouseId: number): Resource<AuctionsResponse>;
//#endregion
export { AuctionsResponse as i, auctions as n, AuctionHouseIndexResponse as r, auctionHouseIndex as t };
//# sourceMappingURL=index-DSc_fuNb.d.ts.map