GunSpec

Docs

Resource class for the documentation endpoints. Instantiated internally by the GunSpec client and exposed as client.docs.

Auth RequiredExplorer+

Get the sample the reference prints for an operation in one language, exactly as printed, with the result of the last run that checked it.

getSample(params: GetDocsSampleParams): Promise<APIResponse<DocsSamples>>
GET/v1/docs/samples

  • stringheaderrequired

    Your API key. Authorization: Bearer <key> is accepted in its place.

  • stringrequired

    The operation's path: a documented template, a concrete path or a full URL.

    Max length
    300
    Example
  • string

    The HTTP method. Needed only when the path answers more than one.

    Accepts
    Example
  • stringrequired

    curl, javascript (TypeScript with fetch), python (requests), unity, unreal, godot, or sdk-typescript / sdk-python for the SDKs.

    Accepts
    Example

  • object

    The response payload.

  • string

    HTTP method of the operation.

  • string

    Its documented path template.

  • string

    The lowest plan that may call it.

  • string

    The operation's page in the reference.

  • string

    The language asked for.

  • string | null

    How to fill in the key placeholder, or null for an operation that takes no key.

  • object[]

    One sample, or one per SDK method for an operation more than one method calls.

  • string

    What the sample is: the tab name, or the SDK call.

  • string

    The sample, exactly as the reference prints it.

  • object | null

    The last run that checked this sample, or null when none has.

  • string | null

    Anything to know before using it, such as why it is not executed, or null.

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 404NOT_FOUNDResource not found
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Minimum tier
Explorer+
Monthly quota
200/mo
Rate limit
10/min
Daily cap
50

Figures shown are for this endpoint's minimum tier. Higher tiers raise every limit.