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+

Get images for a firearm.

getImages(id: string): Promise<APIResponse<FirearmImage[]>>
GET/v1/firearms/{id}/images

  • stringHeadererforderlich

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

  • stringerforderlich

    Resource slug ID

    Akzeptiert
    a lowercase slug: letters, digits and hyphens
    Beispiel

  • FirearmImage[]

    The response payload.

  • integer

    Autoincrementing image id. Numeric, unlike the catalog slugs.

  • string

    Slug of the firearm this row belongs to.

  • string

    Absolute, directly fetchable URL.

  • ImageType | null

    Role of the image: primary, gallery, thumbnail, svg, render.

  • string | null

    Where the record came from: a curated entry, an inference, or an import.

  • string | null

    Licence the asset is held under, where one is recorded.

  • MediaKind | null

    What the asset is: silhouette, render, photo, schematic, model. /v1/firearms/{id}/media/{selector} addresses an asset by this.

  • string | null

    Where the bytes live: cdn for a static path, r2 for an upload we serve.

  • string | null

    Who made the asset, where it is credited.

  • string | null

    Page the asset or document was taken from.

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

  • integer

    Position within its list, ascending.

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 404NOT_FOUNDResource not found
  • 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.