GunSpec

Stats

Resource class for interacting with the GunSpec Statistics API. Wraps all /v1/stats endpoints. Instantiated internally by the GunSpec client and exposed as client.stats.

Authentifizierung erforderlichStudio+

Get firearm statistics for a specific decade/era.

byEra(params: ByEraParams): Promise<APIResponse<EraStats>>
GET/v1/stats/by-era

  • stringHeadererforderlich

    Ihr API-Schlüssel. Authorization: Bearer <key> wird ebenfalls akzeptiert.

  • stringerforderlich

    Decade to report on, formatted like "1990s"

    Beispiel

  • object

    The response payload.

  • integer

    Firearms introduced in the decade.

  • number | null

    Mean unloaded weight in grams, over those that record one.

  • number | null

    Mean magazine capacity, over those that record one.

  • number | null

    Mean barrel length in millimetres, over those that record one.

  • integer | null

    Earliest introduction year inside the decade that any record carries.

  • integer | null

    Latest introduction year inside the decade that any record carries.

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

Mindeststufe
Studio+
Monatskontingent
150,000/mo
Anfragerate
120/min
Tageslimit
10,000

Die Werte gelten für die Mindeststufe dieses Endpunkts. Höhere Stufen erhöhen alle Limits.