GunSpec

Firearms

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

Authentifizierung erforderlichBuilder+

Get firearms ranked by computed power rating.

powerRating(params?: PowerRatingParams): Promise<PaginatedResponse<PowerRating>>
GET/v1/firearms/power-rating

  • stringHeadererforderlich

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

  • string

    Restrict the ranking to a category slug

    Beispiel
  • integerstandard1

    Page number, from 1 to 10,000

    Bereich
    1 – 10000
    Beispiel
  • integerstandard20

    Items per page (max 100)

    Bereich
    1 – 100
    Beispiel

  • object[]

    One page of results

  • string

    Slug of the firearm.

  • string

    Display name, as the maker writes it.

  • string

    Slug of the manufacturer that makes it. Resolve against /v1/manufacturers/{id}.

  • string

    Slug of the category it belongs to. Resolve against /v1/categories.

  • number

    Composite score from 0 to 100, the sum of the weighted components in breakdown.

  • object

    The weighted components powerRating is the sum of.

  • number

    Muzzle-energy component, out of 30.

  • number

    Effective-range component, out of 25.

  • number

    Rate-of-fire component, out of 20.

  • number

    Magazine-capacity component, out of 15.

  • number

    Mobility component, out of 10. Lighter and shorter scores higher.

  • 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
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Mindeststufe
Builder+
Monatskontingent
25,000/mo
Anfragerate
60/min
Tageslimit
2,000

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

Dieser Aufruf beantwortet bedingte Anfragen. Speichern Sie das ETag einer Antwort und senden Sie es als If-None-Match zurueck: ein unveraenderter Datensatz liefert 304 Not Modified ohne Body. Das zaehlt auf Ihr Minutenlimit, aber nicht auf Ihr Tageskontingent.