I am trying to get an roblox game thumbnail using the roblox api. So far I figured out how to get the assets from the roblox api like this:
export interface iRobloxAsset {
assetTypeId: number;
assetType: string;
imageId: number;
videoHash?: any;
videoTitle?: any;
approved: boolean;
}
/**
* Using the https://games.roblox.com/v2/games/{gameId}/media endpoint, get the assets for a game
* @param gameId The Game ID of the game you want to get the assets for
*/
export async function getRobloxGameAssets(gameId: string): Promise<iRobloxAsset[]> {
const response = await fetch(`https://games.roblox.com/v2/games/${gameId}/media`);
const json = await response.json();
return json.assets;
}
however, how do I get the thumbnail using the roblox api?