Skip to content

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

@TDanks2000

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions