Skip to content

Latest commit

 

History

History
650 lines (485 loc) · 48.2 KB

File metadata and controls

650 lines (485 loc) · 48.2 KB

Player

Overview

Player Profiles & Scoring

Available Operations

search

Cost 5

Example Usage

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.player.search({
    name: "<value>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { WaveShieldCore } from "waveshield/core.js";
import { playerSearch } from "waveshield/funcs/playerSearch.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 playerSearch(waveShield, {
    name: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("playerSearch failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetV1PlayerSearchRequest ✔️ 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.

Response

Promise<operations.GetV1PlayerSearchResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

get

Cost 5

Example Usage

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.player.get({
    identifier: "<value>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { WaveShieldCore } from "waveshield/core.js";
import { playerGet } from "waveshield/funcs/playerGet.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 playerGet(waveShield, {
    identifier: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("playerGet failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetV1PlayerIdentifierRequest ✔️ 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.

Response

Promise<operations.GetV1PlayerIdentifierResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

getServers

Cost 5

Example Usage

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.player.getServers({
    identifier: "<value>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { WaveShieldCore } from "waveshield/core.js";
import { playerGetServers } from "waveshield/funcs/playerGetServers.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 playerGetServers(waveShield, {
    identifier: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("playerGetServers failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetV1PlayerIdentifierServersRequest ✔️ 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.

Response

Promise<operations.GetV1PlayerIdentifierServersResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

getBans

Cost 5

Example Usage

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.player.getBans({
    identifier: "<value>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { WaveShieldCore } from "waveshield/core.js";
import { playerGetBans } from "waveshield/funcs/playerGetBans.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 playerGetBans(waveShield, {
    identifier: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("playerGetBans failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetV1PlayerIdentifierBansRequest ✔️ 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.

Response

Promise<operations.GetV1PlayerIdentifierBansResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

getBansHistory

Cost 10

Example Usage

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.player.getBansHistory({
    identifier: "<value>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { WaveShieldCore } from "waveshield/core.js";
import { playerGetBansHistory } from "waveshield/funcs/playerGetBansHistory.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 playerGetBansHistory(waveShield, {
    identifier: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("playerGetBansHistory failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetV1PlayerIdentifierBansHistoryRequest ✔️ 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.

Response

Promise<operations.GetV1PlayerIdentifierBansHistoryResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

getThreatScore

Cost 5

Example Usage

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.player.getThreatScore({
    identifier: "<value>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { WaveShieldCore } from "waveshield/core.js";
import { playerGetThreatScore } from "waveshield/funcs/playerGetThreatScore.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 playerGetThreatScore(waveShield, {
    identifier: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("playerGetThreatScore failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetV1PlayerIdentifierThreatScoreRequest ✔️ 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.

Response

Promise<operations.GetV1PlayerIdentifierThreatScoreResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

analyze

Performs a deep analysis of the player, including alt accounts, bans, and threat score. (Cost: 15)

Example Usage

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.player.analyze({
    identifier: "<value>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { WaveShieldCore } from "waveshield/core.js";
import { playerAnalyze } from "waveshield/funcs/playerAnalyze.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 playerAnalyze(waveShield, {
    identifier: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("playerAnalyze failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetV1PlayerIdentifierAnalysisRequest ✔️ 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.

Response

Promise<models.PlayerAnalysis>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*

discordLookup

Cost 5

Example Usage

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.player.discordLookup({
    identifier: "<value>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { WaveShieldCore } from "waveshield/core.js";
import { playerDiscordLookup } from "waveshield/funcs/playerDiscordLookup.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 playerDiscordLookup(waveShield, {
    identifier: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("playerDiscordLookup failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetV1PlayerIdentifierDiscordLookupRequest ✔️ 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.

Response

Promise<operations.GetV1PlayerIdentifierDiscordLookupResponse>

Errors

Error Type Status Code Content Type
errors.WaveShieldDefaultError 4XX, 5XX */*