Skip to content

Files

Latest commit

36aad9e · Mar 9, 2025

History

History
79 lines (54 loc) · 5.09 KB

README.md

File metadata and controls

79 lines (54 loc) · 5.09 KB

Badges

(leaderboard.badges)

Overview

Available Operations

getList

Example Usage

import { SteamSets } from "@steamsets/client-ts";

const steamSets = new SteamSets({
  token: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await steamSets.leaderboard.badges.getList();

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { SteamSetsCore } from "@steamsets/client-ts/core.js";
import { leaderboardBadgesGetList } from "@steamsets/client-ts/funcs/leaderboardBadgesGetList.js";

// Use `SteamSetsCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const steamSets = new SteamSetsCore({
  token: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await leaderboardBadgesGetList(steamSets);

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
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.LeaderboardV1GetBadgesResponse>

Errors

Error Type Status Code Content Type
errors.ErrorModel 404 application/problem+json
errors.ErrorModel 500 application/problem+json
errors.SDKError 4XX, 5XX */*