GunSpec

Content

Resource class for the GunSpec content feeds. Instantiated internally by the GunSpec client and exposed as client.content.

Authentifizierung optionalExplorer+

The notices the website is showing right now, best first. Public, cached for a minute at the edge. An empty list means no banner.

listNotices(): Promise<APIResponse<{ notices: SiteNotice[] }>>
GET/v1/notices

  • stringHeader

    Optional. Ohne Schlüssel antwortet dieser Endpunkt nach der öffentlichen Richtlinie; ein Schlüssel erhöht Ihre Limits und schaltet planabhängige Felder frei. Authorization: Bearer <key> wird ebenfalls akzeptiert.

  • object

    The response payload.

  • SiteNotice[]

    Published notices inside their display window, best first: highest priority, then newest.

  • string

    Row id of the notice. The website keys its dismissal on this, so a new notice is seen even by a reader who dismissed the last one.

  • string

    Short label shown before the message.

  • string

    The sentence shown in the banner.

  • string

    A second line, shown under the highlight where one is set.

  • NoticeVariant

    How prominently a site notice is shown.

  • string | null

    Text of the call to action, or null when the banner has none.

  • string | null

    Where the call to action goes.

  • integer

    Higher sorts first. Ties break on newest.

  • string | null

    When the notice becomes visible. Null means immediately.

  • string | null

    When it stops being shown. This is why notices are rows rather than copy: an end date is the only version of "take this down later" that does not rely on somebody remembering.

  • 400VALIDATION_ERRORValidation error
  • 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.