74 std::vector<SteamGridDBImage>
grids;
75 std::vector<SteamGridDBImage>
heroes;
76 std::vector<SteamGridDBImage>
logos;
77 std::vector<SteamGridDBImage>
icons;
122 static void setApiKey(
const std::string& key);
145 static std::vector<SteamGridDBGame>
searchGames(
const std::string& query);
154 const std::function<
void(
const std::vector<SteamGridDBGame>&)>& callback);
172 static std::vector<SteamGridDBImage>
getGridImages(
int gameId);
179 static std::vector<SteamGridDBImage>
getHeroImages(
int gameId);
186 static std::vector<SteamGridDBImage>
getLogoImages(
int gameId);
193 static std::vector<SteamGridDBImage>
getIconImages(
int gameId);
230 const std::function<
void(
const std::string&)>& callback);
258 static std::string httpGet(
const std::string& url,
259 const std::map<std::string, std::string>& headers = {});
260 static bool downloadFile(
const std::string& url,
const std::string& localPath);
261 static std::string urlEncode(
const std::string& str);
264 static std::vector<SteamGridDBGame> parseGamesJson(
const std::string&
json);
265 static std::vector<SteamGridDBImage> parseImagesJson(
const std::string&
json);
268 static std::string sanitizeFilename(
const std::string& name);
269 static std::string getImageExtension(
const std::string& mime);
275 static std::string apiKey_;
276 static std::mutex apiKeyMutex_;
Service for fetching game images from SteamGridDB.
static std::vector< SteamGridDBGame > searchGames(const std::string &query)
Search for games by name.
static std::string downloadImage(const SteamGridDBImage &image, const std::string &gameName)
Download an image to local cache.
static std::string getCachedCover(const std::string &gameName)
Check if we have a cached cover for a game.
static std::vector< SteamGridDBImage > getGridImages(int gameId)
Get grid/cover images for a game.
static SteamGridDBGame getGameBySteamAppId(int steamAppId)
Get game info by Steam App ID.
static std::string downloadBestCover(const std::string &gameName)
Download best cover art for a game by name.
static void searchGamesAsync(const std::string &query, const std::function< void(const std::vector< SteamGridDBGame > &)> &callback)
Search for games by name asynchronously.
static void setApiKey(const std::string &key)
Set the API key for SteamGridDB.
static std::vector< SteamGridDBImage > getLogoImages(int gameId)
Get logo images for a game.
static bool hasApiKey()
Check if API key is configured.
static SteamGridDBImageSet getAllImages(int gameId)
Get all images for a game.
static void downloadBestCoverAsync(const std::string &gameName, const std::function< void(const std::string &)> &callback)
Download best cover art asynchronously.
static void clearCache()
Clear all cached images.
static size_t getCacheSize()
Get total size of cached images in bytes.
static std::string getCacheDirectory()
Get the cache directory for downloaded images.
static std::vector< SteamGridDBImage > getHeroImages(int gameId)
Get hero images for a game.
static std::vector< SteamGridDBImage > getIconImages(int gameId)
Get icon images for a game.
Search result from SteamGridDB.
int steamAppId
Steam App ID if linked (0 if not Steam).
std::string releaseDate
Release date (YYYY-MM-DD).
std::string name
Game name.
bool verified
If game is verified on SteamGridDB.
Complete set of images for a game.
std::vector< SteamGridDBImage > icons
Icon images.
std::vector< SteamGridDBImage > heroes
Hero images (wide banners).
std::vector< SteamGridDBImage > logos
Logo images with transparency.
std::vector< SteamGridDBImage > grids
Cover art / grid images (600x900).
Image result from SteamGridDB.
int width
Image width in pixels.
std::string thumbUrl
URL for thumbnail.
std::string mime
MIME type (image/png, image/jpeg).
std::string url
URL to download image.
std::string style
Style: "alternate", "blurred", "white_logo", etc.
int score
Community score.
int height
Image height in pixels.