Goonstation 13 - Modules - TypesVar Details - Proc Details

/datum/apiRoute

Base apiCall type Represents a predefined query we can make to the Goonhub API SECURITY: Sanitization occurs right before output

Vars

allow_retryIs this request allowed to automatically retry if it fails?
bodyBody of the request, invalid for GET
correct_responseThe expected type upon deserialization
methodHTTP Method this call uses, for example RUSTG_HTTP_METHOD_GET
pathActual path of the api query, for example /rounds
queryParamsQuery parameters for the call, ie /rounds?&id=3
routeParamsRoute parameters for the call, ie /rounds/{round_id}/ - Must be in order

Procs

formatQueryParamsFormats a given parameter associated list into a urlstring format E.g. list("ckey"="zewaka") to ?&ckey=zewakaandlist("x"=list("a" = "foo", "b" = "bar"))to?&x[a]=foo&x[b]=bar`
formatRouteParamsFormats a given parameter list into a route-append format E.g. list("tuesday", "wednesday") to tuesday/wednesday

Var Details

allow_retry

Is this request allowed to automatically retry if it fails?

body

Body of the request, invalid for GET

correct_response

The expected type upon deserialization

method

HTTP Method this call uses, for example RUSTG_HTTP_METHOD_GET

path

Actual path of the api query, for example /rounds

queryParams

Query parameters for the call, ie /rounds?&id=3

routeParams

Route parameters for the call, ie /rounds/{round_id}/ - Must be in order

Proc Details

formatQueryParams

Formats a given parameter associated list into a urlstring format E.g. list("ckey"="zewaka") to ?&ckey=zewakaandlist("x"=list("a" = "foo", "b" = "bar"))to?&x[a]=foo&x[b]=bar`

formatRouteParams

Formats a given parameter list into a route-append format E.g. list("tuesday", "wednesday") to tuesday/wednesday