The options for the REST manager.
Readonly optionsOptional Readonly proxyThe proxy url of the REST API.
Readonly routerThe router for the REST API.
Optional tokenThe auth token for the REST API.
Optional Readonly versionThe version of the REST API.
The base URL for the REST API.
Make a request to the REST API.
The response from the REST API.
rest.request('/channels/abc', 'GET');
The path to the resource.
The HTTP method.
Optional options: FetchOptions<B, P>The options for the request.
Optional retries: numberThe number of retries.
Make a GET request to the REST API.
The response from the REST API.
rest.get('/channels/abc');
The path to the resource.
Optional params: PThe query parameters for the request.
Make a PATCH request to the REST API.
The response from the REST API.
rest.patch('/channels/abc', { name: 'Chat' });
The path to the resource.
Optional body: BThe body for the request.
Make a POST request to the REST API.
The response from the REST API.
rest.post('/channels', { name: 'Chat', type: 'chat' });
The path to the resource.
Optional body: BThe body for the request.
Make a PUT request to the REST API.
The response from the REST API.
rest.put('/channels/abc/messages/abc', { content: 'Hello world!' });
The path to the resource.
Optional body: BThe body for the request.
Set the auth token for the REST API.
The REST manager.
rest.setToken('token');
Optional token: stringThe auth token.
The REST manager for the Guilded API.
Example