/datum/apiRoute
Base apiCall type Represents a predefined query we can make to the Goonhub API SECURITY: Sanitization occurs right before output
Vars | |
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 |
Procs | |
formatQueryParams | Formats a given parameter associated list into a urlstring format
E.g. list("ckey"="zewaka") to ?&ckey=zewakaand list("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 |
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=zewakaand
list("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