(badge)
Any request that is related to steam badges, mostly badge search/tagging related.
import { SteamSets } from "@steamsets/client-ts";
const steamSets = new SteamSets({
token: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await steamSets.badge.getTags();
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { SteamSetsCore } from "@steamsets/client-ts/core.js";
import { badgeGetTags } from "@steamsets/client-ts/funcs/badgeGetTags.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 badgeGetTags(steamSets);
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
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. |
Promise<operations.BadgeV1TagsResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.ErrorModel | 403, 404 | application/problem+json |
errors.ErrorModel | 500 | application/problem+json |
errors.SDKError | 4XX, 5XX | */* |
import { SteamSets } from "@steamsets/client-ts";
const steamSets = new SteamSets({
token: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await steamSets.badge.search({
filter: "<value>",
query: "<value>",
sort: [
"price:asc",
"author:desc",
],
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { SteamSetsCore } from "@steamsets/client-ts/core.js";
import { badgeSearch } from "@steamsets/client-ts/funcs/badgeSearch.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 badgeSearch(steamSets, {
filter: "<value>",
query: "<value>",
sort: [
"price:asc",
"author:desc",
],
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
components.V1SearchRequest | ✔️ | 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.BadgeV1SearchResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.ErrorModel | 403, 404, 422 | application/problem+json |
errors.ErrorModel | 500 | application/problem+json |
errors.SDKError | 4XX, 5XX | */* |
import { SteamSets } from "@steamsets/client-ts";
const steamSets = new SteamSets({
token: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await steamSets.badge.suggest({
query: "<value>",
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { SteamSetsCore } from "@steamsets/client-ts/core.js";
import { badgeSuggest } from "@steamsets/client-ts/funcs/badgeSuggest.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 badgeSuggest(steamSets, {
query: "<value>",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
components.V1BadgeSearchSuggesttRequestBody | ✔️ | 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.BadgeV1SearchSuggestResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.ErrorModel | 403, 404, 422 | application/problem+json |
errors.ErrorModel | 500 | application/problem+json |
errors.SDKError | 4XX, 5XX | */* |
import { SteamSets } from "@steamsets/client-ts";
const steamSets = new SteamSets({
token: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await steamSets.badge.suggestTags({
badgeId: "<id>",
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { SteamSetsCore } from "@steamsets/client-ts/core.js";
import { badgeSuggestTags } from "@steamsets/client-ts/funcs/badgeSuggestTags.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 badgeSuggestTags(steamSets, {
badgeId: "<id>",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
components.V1BadgeTagsSuggestRequestBody | ✔️ | 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.BadgeV1TagsSuggestResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.ErrorModel | 403, 404, 422 | application/problem+json |
errors.ErrorModel | 500 | application/problem+json |
errors.SDKError | 4XX, 5XX | */* |
import { SteamSets } from "@steamsets/client-ts";
const steamSets = new SteamSets({
token: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await steamSets.badge.tag({
badgeId: "bdg_123",
colors: [
{
id: "bdg_col_2r2pqaIpB1zllfZIvUE3OWadIOS",
remove: true,
},
{
id: "bdg_col_2r2pqaIpB1zllfZIvUE3OWadIOS",
remove: true,
},
{
id: "bdg_col_2r2pqaIpB1zllfZIvUE3OWadIOS",
remove: true,
},
],
designs: [
{
id: "bdg_des_2r3yFWjSJzH89FKbYgpkJxF24ZL",
name: "cat",
remove: true,
},
{
id: "bdg_des_2r3yFWjSJzH89FKbYgpkJxF24ZL",
name: "cat",
remove: true,
},
],
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { SteamSetsCore } from "@steamsets/client-ts/core.js";
import { badgeTag } from "@steamsets/client-ts/funcs/badgeTag.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 badgeTag(steamSets, {
badgeId: "bdg_123",
colors: [
{
id: "bdg_col_2r2pqaIpB1zllfZIvUE3OWadIOS",
remove: true,
},
{
id: "bdg_col_2r2pqaIpB1zllfZIvUE3OWadIOS",
remove: true,
},
{
id: "bdg_col_2r2pqaIpB1zllfZIvUE3OWadIOS",
remove: true,
},
],
designs: [
{
id: "bdg_des_2r3yFWjSJzH89FKbYgpkJxF24ZL",
name: "cat",
remove: true,
},
{
id: "bdg_des_2r3yFWjSJzH89FKbYgpkJxF24ZL",
name: "cat",
remove: true,
},
],
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
components.V1BadgeTagRequestBody | ✔️ | 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.BadgeV1TagResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.ErrorModel | 403, 404, 422 | application/problem+json |
errors.ErrorModel | 500 | application/problem+json |
errors.SDKError | 4XX, 5XX | */* |