Function getBadgesByGameIdList

  • Returns a list of all badges assigned to a game with given ID (if it exists).

    Game is identified by its Steam ID.

    Filter options

    • isLegacy - filters by badge's legacy status,
    • isEnabled - filters by badge's enabled status.

    Sort options

    • points - sorts by badge's point value.

    Usage

    const gameId: number = 21645;
    const badgesAll: Badge[] = await sdk.getBadgesByGameId({ gameId });
    const badgePointsAsc: Badge[] = await sdk.getBadgesByGameId({ gameId, sort: { points: 'asc' }});
    const badgesNonLegacy: Badge[] = await sdk.getBadgesByGameId({ gameId, filter: { isLegacy: false }});

    // TODO currently this endpoint does not support non-Steam games as those don't have gameID.

    Parameters

    Returns Promise<Badge[]>

Generated using TypeDoc