Skip to main content

Get Public Game

Retrieve detailed information about a specific public game.

Endpoint

GET /api/v2/public/games/{slug}

Authentication

This endpoint is public and does not require authentication.

Description

This endpoint returns comprehensive information about a specific game, including name, description, visual assets, platforms, and social links.

Path Parameters

ParameterTypeRequiredDescription
slugstringYesUnique identifier for the game

Request Example

GET /api/v2/public/games/my-awesome-game

Response

Success Response (200)

{
"name": "My Awesome Game",
"slug": "my-awesome-game",
"description": "An amazing game with incredible features and stunning gameplay",
"color": "#FF5733",
"images": [
"https://example.com/game-screenshot1.jpg",
"https://example.com/game-screenshot2.jpg",
"https://example.com/game-logo.jpg"
],
"icon": "https://example.com/game-icon.png",
"tags": ["action", "multiplayer", "adventure"],
"socials": [
{
"platform": "twitter",
"url": "https://twitter.com/myawesomegame"
},
{
"platform": "discord",
"url": "https://discord.gg/myawesomegame"
}
],
"platforms": ["web", "mobile", "desktop"],
"createdAt": 1672531200000,
"updatedAt": 1704067200000
}

Error Response (404)

{
"message": "Game not found",
"status": 404
}

Error Response (400)

{
"message": "Invalid game slug",
"status": 400
}

Response Fields

FieldTypeRequiredDescription
namestringYesGame name
slugstringYesURL-friendly game identifier
descriptionstringYesGame description
colorstringYesGame theme color (hex code)
imagesstring[]YesArray of game image URLs
iconstringNoGame icon URL (optional)
tagsstring[]NoArray of game tags (optional)
socialsobject[]NoArray of social media links (optional)
platformsstring[]YesArray of supported platforms
createdAtnumberYesCreation date (Unix timestamp in ms)
updatedAtnumberYesLast update date (Unix timestamp in ms)

Social Media Object Fields

FieldTypeDescription
platformstringSocial media platform name
urlstringURL to the game's social media page

Usage Example

const response = await fetch("https://api.intraverse.io/api/v2/public/games/my-awesome-game");

const game = await response.json();

console.log(`Game: ${game.name}`);
console.log(`Slug: ${game.slug}`);
console.log(`Description: ${game.description}`);
console.log(`Theme Color: ${game.color}`);
console.log(`Platforms: ${game.platforms.join(", ")}`);
console.log(`Images: ${game.images.length} available`);

if (game.tags && game.tags.length > 0) {
console.log(`Tags: ${game.tags.join(", ")}`);
}

if (game.socials && game.socials.length > 0) {
console.log("Social Links:");
game.socials.forEach((social) => {
console.log(`- ${social.platform}: ${social.url}`);
});
}

console.log(`Created: ${new Date(game.createdAt).toISOString()}`);
console.log(`Updated: ${new Date(game.updatedAt).toISOString()}`);

Error Handling

ErrorDescriptionSolution
Game not foundGame slug doesn't existVerify the game slug
Invalid slugSlug format is incorrectUse valid slug format

Next Steps