Get undocumented endpoint

The getUndocumented method on a Client instance makes a GET request to an inputted endpoint. This is mainly used to get data from undocumented or unstable endpoints.

Example

interface Backgrounds {
  ends_at: string;
  backgrounds: {
    url: string;
  }[];
}

const backgrounds = await api.getUndocumented<Backgrounds>('seasonal-backgrounds');

Parameters

ParameterTypeOptionalDescription
endpointstringEndpoint to make a GET request to
optionsOmit<Options, ‘body’>
options.queryRecord<string, unknown>URL Query parameters

Returns

Promise<T>;

T is a Typescript generic.

Possible Exceptions

See the error handling documentation for more information.

  • invalid_json_syntax
  • network_error
  • unexpected_response

Notice that something is missing? Found a typo? Think something's incomplete? Or think that something can be explained better? Feel free to open a pull request or submit an issue on the library's Github repository .