open-index/open-npm huggingface dataset:
npm package: @razulmao/rest
Description: The REST API for multiple Letoa components.
Latest version: 1.0.4

# `@razulmao/rest`

> A fork of @discordjs/rest but with more features.

# 1.0.4

### Proxy support has been added for requests.

### An example is below.

```js
import { REST } from '@razulmao/rest';

class RequestClient extends REST {
	client = new REST();
	authPrefix;

	/**
	 * @param {string} token
	 * @param {"Bot" | "Bearer"} authPrefix
	 **/
	construct(token, authPrefix = 'Bot') {
		if (token) this.client.setToken(token);
		this.authPrefix = authPrefix;
	}

	/**
	 * @description "Fetches the users information."
	 **/
	fetchMe() {
		return this.client.get('/users/@me', {
			authPrefix: this.authPrefix,
			proxy: {
				type: 'https',
				proxyURL: 'https://127.0.0.1:80',
			},
		});
	}
}
```

# Basic Example

```js
import { REST } from '@razulmao/rest';

class RequestClient extends REST {
	client = new REST();
	authPrefix;

	/**
	 * @param {string} token
	 * @param {"Bot" | "Bearer"} authPrefix
	 **/
	construct(token, authPrefix = 'Bot') {
		if (token) this.client.setToken(token);
		this.authPrefix = authPrefix;
	}

	/**
	 * @description "Fetches the users information."
	 **/
	fetchMe() {
		return this.client.get('/users/@me', {
			authPrefix: this.authPrefix,
		});
	}
}
```