GunSpec

GameStats

Resource class for interacting with the GunSpec Game Stats Snapshots API. Wraps all /v1/game-stats endpoints. Instantiated internally by the GunSpec client and exposed as client.gameStats.

Auth RequiredBuilder+

List all available game stats snapshot versions.

listVersions(): Promise<APIResponse<GameStatsVersion[]>>
GET/v1/game-stats/versions

  • stringheaderrequired

    Your API key. Authorization: Bearer <key> is accepted in its place.

  • GameStatsVersion[]

    The response payload.

  • integer

    Autoincrementing version id.

  • string

    Version label, e.g. 2025.1.

  • string | null

    Prose summary of the record, where one has been written.

  • integer

    How many firearms carried game statistics in this version.

  • string

    When the record was first added, YYYY-MM-DD HH:MM:SS in UTC.

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Minimum tier
Builder+
Monthly quota
25,000/mo
Rate limit
60/min
Daily cap
2,000

Figures shown are for this endpoint's minimum tier. Higher tiers raise every limit.

Auth RequiredBuilder+

List all firearms in a specific game stats snapshot version.

listFirearms(version: string, params?: ListSnapshotFirearmsParams): Promise<PaginatedResponse<GameStatsSnapshotEntry>>
GET/v1/game-stats/versions/{version}/firearms

  • stringheaderrequired

    Your API key. Authorization: Bearer <key> is accepted in its place.

  • stringrequired

    Snapshot version

    Accepts
    matching ^[a-z0-9][a-z0-9.\-]*$
    Example

  • integerdefault1

    Page number, from 1 to 10,000

    Range
    1 – 10000
    Example
  • integerdefault20

    Items per page (max 100)

    Range
    1 – 100
    Example

  • GameStatsSnapshotEntry[]

    One page of results

  • string

    Slug of the firearm this row is about.

  • string

    Display name at the time the snapshot was taken.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • number

    Current page number

  • number

    Items per page

  • number

    Total matching records (Builder and above)

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 404NOT_FOUNDResource not found
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Minimum tier
Builder+
Monthly quota
25,000/mo
Rate limit
60/min
Daily cap
2,000

Figures shown are for this endpoint's minimum tier. Higher tiers raise every limit.

Auth RequiredBuilder+

Get a single firearm's game stats from a specific snapshot version.

getFirearm(version: string, id: string): Promise<APIResponse<GameStatsSnapshotEntry>>
GET/v1/game-stats/versions/{version}/firearms/{id}

  • stringheaderrequired

    Your API key. Authorization: Bearer <key> is accepted in its place.

  • stringrequired

    Snapshot version

    Accepts
    matching ^[a-z0-9][a-z0-9.\-]*$
    Example
  • stringrequired

    Firearm slug

    Accepts
    a lowercase slug: letters, digits and hyphens
    Example

  • GameStatsSnapshotEntry

    The response payload

  • string

    Slug of the firearm this row is about.

  • string

    Display name at the time the snapshot was taken.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • integer | null

    Editorial game statistic as it stood in this snapshot, 0-100.

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 404NOT_FOUNDResource not found
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Minimum tier
Builder+
Monthly quota
25,000/mo
Rate limit
60/min
Daily cap
2,000

Figures shown are for this endpoint's minimum tier. Higher tiers raise every limit.