@dota2classic/steam-market
Version:
Steam market API client
55 lines (54 loc) • 2.7 kB
TypeScript
import { ECurrencyCode } from './types/ECurrencyCode.js';
import { type MarketOptions } from './types/MarketOptions.js';
import { type SearchOptions } from './types/SearchOptions.js';
import { type CreateBuyOrderOptions } from './types/CreateBuyOrderOptions.js';
import { type CreateSellOrderOptions } from './types/CreateSellOrderOptions.js';
import { type Search } from './types/Search.js';
import { type Listings } from './types/Listings.js';
import { type ItemOrdersHistogram } from './types/ItemOrdersHistogram.js';
import { type PriceOverview } from './types/PriceOverview.js';
import { type PriceHistory } from './types/PriceHistory.js';
import { type MyListings } from './types/MyListings.js';
import { type MyHistory } from './types/MyHistory.js';
import { type CreateBuyOrder } from './types/CreateBuyOrder.js';
import { type CreateSellOrder } from './types/CreateSellOrder.js';
import { type BuyOrderStatus } from './types/BuyOrderStatus.js';
declare class SteamMarket {
private readonly server;
private sessionId;
private currency;
private digits;
private units;
private country;
private language;
private vanityURL;
constructor(options?: MarketOptions | null);
private processAsset;
private processAssets;
private processListing;
setCookies(cookies: string[]): void;
setCurrency(currency: ECurrencyCode): void;
setCountry(country: string): void;
setVanityURL(vanityURL: string): void;
getCookies(): string[];
getSessionId(): string;
getCurrency(): ECurrencyCode;
getDigits(): number;
getUnits(): number;
getCountry(): string;
getLanguage(): string;
getVanityURL(): string;
search(appId: number, options?: SearchOptions | null): Promise<Search>;
listings(appId: number, marketHashName: string): Promise<Listings>;
itemOrdersHistogram(appId: number, marketHashName: string, itemNameId: number): Promise<ItemOrdersHistogram>;
priceOverview(appId: number, marketHashName: string): Promise<PriceOverview>;
priceHistory(appId: number, marketHashName: string): Promise<PriceHistory>;
myListings(start?: number | null, count?: number | null): Promise<MyListings>;
myHistory(start?: number | null, count?: number | null): Promise<MyHistory>;
createBuyOrder(appId: number, options: CreateBuyOrderOptions): Promise<CreateBuyOrder>;
createSellOrder(appId: number, options: CreateSellOrderOptions): Promise<CreateSellOrder>;
buyOrderStatus(appId: number, marketHashName: string, buyOrderId: number): Promise<BuyOrderStatus>;
cancelBuyOrder(buyOrderId: number): Promise<null>;
cancelSellOrder(listingId: string): Promise<[]>;
}
export default SteamMarket;