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 arranged in a chronological timeline.

timeline(params?: TimelineParams): Promise<PaginatedResponse<Firearm>>
GET/v1/firearms/timeline

  • stringHeadererforderlich

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

  • integer

    Earliest year of introduction

    Beispiel
  • integer

    Latest year of introduction

    Beispiel
  • string

    Restrict to a category slug

    Beispiel
  • integerstandard1

    Page number

    Bereich
    1 – 10000
    Beispiel
  • integerstandard50

    Items per page (max 100)

    Bereich
    1 – 100
    Beispiel
  • stringstandardasc

    Sort order

    Akzeptiert
    Beispiel

  • TimelineEntry[]

    One page of results

  • string

    URL-safe slug identifying the firearm, e.g. glock-17-gen5.

  • string

    Display name, as the maker writes it.

  • string | null

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

  • string | null

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

  • integer | null

    Year it entered production or service. Null where the date is disputed or unknown.

  • integer | null

    Year production ended, or null while it is still made.

  • string | null

    Production status, one of in_production, discontinued, out_of_production, in_service, limited_production, prototype. Discontinued records are kept deliberately: a rifle built in 2004 wears parts nobody sells today.

  • string | null

    ISO 3166-1 alpha-2 code of where it was designed, e.g. AT.

  • 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.