Skip to content

Add example for fetching a game detail view with cover art #6

Open

Description

@TDanks2000

Background

Many apps using IGDB need a game detail page that fetches a single game by slug or ID and renders summary, release date, rating, and cover art.

Proposed change

Add a copyable example file that uses the typed query builder to fetch one game and buildImageUrl() to build a cover image URL.

Acceptance criteria

  • Uses .first() or .findById() accurately.
  • Selects only fields needed by the detail view.
  • Handles a missing game or missing cover image gracefully.
  • Calls client.dispose() in a finally block like the existing examples.

Files likely involved

  • examples/game-detail.ts
  • examples/README.md
  • docs/examples.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions