This package allows you to fetch image resources for video games (such as Steam games).
To use this package, put the following in the dependencies of your Package.swift:
.package(url: "https://github.com/256Arts/SteamGridDB-Swift-API.git", from: "1.0.0")import SteamGridDBSwiftAPI
// Configure database
let db = SteamGridDB(apiKey: "<YOUR KEY>")
db.includeAdultContent = true
// Fetch game info
let results = try await db.search(query: "<GAME NAME>")
let gameInfo = try await db.game(id: <GAME ID>)
// Fetch images
// Only game ID parameter is required, but there are many other optional parameters.
let gridImages = try await db.grids(for: <GAME ID>, dimensions: [.x512x512, .x1024x1024])
let heroImages = try await db.heroes(for: <GAME ID>, styles: [.blurred])
let logos = try await db.logos(for: <GAME ID>, limit: 20, page: 2)
let icons = try await db.icons(for: <GAME ID>)