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 erforderlichExplorer+

Every firearm that has imagery, one row each.

mediaCatalog(params?: MediaCatalogParams): Promise<PaginatedResponse<MediaCatalogItem>>
GET/v1/firearms/media

  • stringHeadererforderlich

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

  • integerstandard1

    Page number

    Bereich
    1 – 10000
    Beispiel
  • integerstandard250

    Firearms per page

    Bereich
    1 – 1000
    Beispiel
  • string

    Restrict the images on each row to one kind

    Akzeptiert

  • MediaCatalogEntry[]

    One firearm and the real imagery it has. Deliberately three fields: this is the index for a media grid or a mirroring job, not a catalogue row. Silhouettes are excluded: every firearm has one, and they have their own build-time manifest.

  • string

    Slug of the firearm this row is about.

  • string

    Display name, as the maker writes it.

  • InlineMediaItem[]

    The imagery on file for it, silhouette excluded, since every firearm has one of those.

  • integer

    Autoincrementing image id.

  • string

    Absolute, directly fetchable URL.

  • MediaKind

    What kind of asset a media row is.

  • string | null

    Alt text, where one has been written. Null otherwise, so do not render an empty string.

  • integer | null

    Pixel width, where it is known.

  • integer | null

    Pixel height, where it is known.

  • 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
Explorer+
Monatskontingent
200/mo
Anfragerate
10/min
Tageslimit
50

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.