Global Ban Database
Cost 2
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.bans.getRecent({});
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { bansGetRecent } from "waveshield/funcs/bansGetRecent.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await bansGetRecent(waveShield, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("bansGetRecent failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetV1BansRecentRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetV1BansRecentResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 5
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.bans.search();
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { bansSearch } from "waveshield/funcs/bansSearch.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await bansSearch(waveShield);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("bansSearch failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetV1BansSearchRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetV1BansSearchResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 5
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.bans.getStats();
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { bansGetStats } from "waveshield/funcs/bansGetStats.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await bansGetStats(waveShield);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("bansGetStats failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetV1BansStatsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetV1BansStatsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |
Cost 10
import { WaveShield } from "waveshield";
const waveShield = new WaveShield({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const result = await waveShield.bans.getTrends();
console.log(result);
}
run();The standalone function version of this method:
import { WaveShieldCore } from "waveshield/core.js";
import { bansGetTrends } from "waveshield/funcs/bansGetTrends.js";
// Use `WaveShieldCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const waveShield = new WaveShieldCore({
security: {
apiKeyAuth: process.env["WAVESHIELD_API_KEY_AUTH"] ?? "",
apiSecretAuth: process.env["WAVESHIELD_API_SECRET_AUTH"] ?? "",
},
});
async function run() {
const res = await bansGetTrends(waveShield);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("bansGetTrends failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetV1BansTrendsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.GetV1BansTrendsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.WaveShieldDefaultError | 4XX, 5XX | */* |