igdb-types
Version:
TypeScript type definitions for IGDB API responses
118 lines (117 loc) • 4.59 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WebsiteCategoryEnum = void 0;
/**
* Represents the category of a website associated with a game or company in the IGDB database.
*
* This enum is used to categorize different types of websites related to games, such as
* official websites, social media profiles, storefronts, and community sites.
* It's commonly used with the `Website` type to indicate what kind of website is being referenced.
*
* @example
* ```typescript
* import { Website, WebsiteCategoryEnum } from 'igdb-types';
*
* // Filter websites to find the official site
* const officialSite = game.websites?.find(website =>
* typeof website !== 'number' && website.category === WebsiteCategoryEnum.OFFICIAL
* );
*
* // Get all social media links
* const socialMediaSites = game.websites?.filter(website =>
* typeof website !== 'number' &&
* [
* WebsiteCategoryEnum.FACEBOOK,
* WebsiteCategoryEnum.TWITTER,
* WebsiteCategoryEnum.INSTAGRAM,
* WebsiteCategoryEnum.DISCORD,
* WebsiteCategoryEnum.BLUESKY
* ].includes(website.category)
* );
* ```
*
* @see https://api-docs.igdb.com/#website For more information about websites in the IGDB API
*/
var WebsiteCategoryEnum;
(function (WebsiteCategoryEnum) {
/**
* The official website for the game or company.
* This is typically the main website created and maintained by the developer or publisher.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["OFFICIAL"] = 1] = "OFFICIAL";
/**
* A Wikia/Fandom community wiki page for the game.
* These are fan-maintained encyclopedias with detailed information about game content.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["WIKIA"] = 2] = "WIKIA";
/**
* The Wikipedia page for the game or company.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["WIKIPEDIA"] = 3] = "WIKIPEDIA";
/**
* The official Facebook page for the game or company.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["FACEBOOK"] = 4] = "FACEBOOK";
/**
* The official Twitter/X account for the game or company.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["TWITTER"] = 5] = "TWITTER";
/**
* The official Twitch channel for the game or company.
* Often used for streaming gameplay, developer updates, or esports events.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["TWITCH"] = 6] = "TWITCH";
/**
* The official Instagram account for the game or company.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["INSTAGRAM"] = 8] = "INSTAGRAM";
/**
* The official YouTube channel for the game or company.
* Typically contains trailers, gameplay videos, and developer updates.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["YOUTUBE"] = 9] = "YOUTUBE";
/**
* The App Store (iOS) page for the iPhone version of the game.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["IPHONE"] = 10] = "IPHONE";
/**
* The App Store (iOS) page for the iPad version of the game.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["IPAD"] = 11] = "IPAD";
/**
* The Google Play Store page for the Android version of the game.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["ANDROID"] = 12] = "ANDROID";
/**
* The Steam store page for the game.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["STEAM"] = 13] = "STEAM";
/**
* The official subreddit for the game or company.
* A community-driven discussion forum on Reddit.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["REDDIT"] = 14] = "REDDIT";
/**
* The itch.io store page for the game.
* A platform primarily for independent game developers.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["ITCH"] = 15] = "ITCH";
/**
* The Epic Games Store page for the game.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["EPICGAMES"] = 16] = "EPICGAMES";
/**
* The GOG (Good Old Games) store page for the game.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["GOG"] = 17] = "GOG";
/**
* The official Discord server for the game or company.
* A community chat and voice communication platform.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["DISCORD"] = 18] = "DISCORD";
/**
* The official Bluesky account for the game or company.
* A decentralized social media platform.
*/
WebsiteCategoryEnum[WebsiteCategoryEnum["BLUESKY"] = 19] = "BLUESKY";
})(WebsiteCategoryEnum || (exports.WebsiteCategoryEnum = WebsiteCategoryEnum = {}));