UNPKG

epic-games-store-crawler

Version:

A crawler to retrieve store data from the Epic Games store

77 lines (76 loc) 1.94 kB
import { CatalogVar, FreeCatalogVar, News, CatalogTags } from "./type/types"; /** * A crawler for the Epic Games Store. Crawls various data from the Epic Games Store. */ declare const Crawler: { (): void; /** * Retrieve all catalog items for given variables * @param variables variables for GraphQL query * * @example * * import { Crawler } from 'epic-games-store-crawler'; * * Crawler.getItems({ * allowedCountries: 'DE', * category: 'games/edition/base|bundles/games|editors', * count: 30, * country: 'DE', * locale: 'de' * }); * * @returns catalog items */ getItems(variables: CatalogVar): Promise<any>; /** * Retrieve all free catalog items for given variables * @param variables variables for GraphQL query * * @example * * import { Crawler }from 'epic-games-store-crawler'; * * Crawler.getFreeGames({ * allowCountries: 'DE', * country: 'DE', * locale: 'de' * }); * * @returns free catalog items */ getFreeGames(variables: FreeCatalogVar): Promise<any>; /** * Retrieve news feed * @param locale current locale * @param limit number of entries * * @example * * import Crawler from 'epic-games-store-crawler'; * * Crawler.getNews('de', 30); * * @returns Epic Games Store news */ getNews(locale: String, limit?: number): Promise<News>; /** * Retrieve catalog tags * @param {CatalogTags} variables * * @example * * import { Crawler } from 'epic-games-store-crawler'; * * Crawler.getCatalogTags({ * namespace: 'epic', * locale: 'de', * start: 0, * count: 999 * }); * * @returns catalog tags */ getCatalogTags(variables: CatalogTags): Promise<any>; }; export default Crawler;