Table of Contents

Class SteamApiServiceExtensions

Namespace
Uncreated.Warfare.Steam
Assembly
Uncreated.Warfare.dll

Extensions implementing common functions for the Steam Web API.

public static class SteamApiServiceExtensions
Inheritance
SteamApiServiceExtensions
Inherited Members

Fields

BaseSteamApiUrl

Base URL for all API requests.

public static readonly string BaseSteamApiUrl

Field Value

string

Methods

GetPlayerFriendsAsync(ISteamApiService, ulong, CancellationToken)

Get the PlayerFriendsList steam API object for a single player, which contains a list of their friends if their profile is public.

public static Task<PlayerFriendsList> GetPlayerFriendsAsync(this ISteamApiService service, ulong player, CancellationToken token = default)

Parameters

service ISteamApiService
player ulong
token CancellationToken

Returns

Task<PlayerFriendsList>

Exceptions

SteamApiRequestException

Failed to fetch the data for some reason.

GetPlayerSummariesAsync(ISteamApiService, IReadOnlyList<ulong>, int, int, CancellationToken)

Get the PlayerSummary steam API object for multiple players.

public static Task<PlayerSummary[]> GetPlayerSummariesAsync(this ISteamApiService service, IReadOnlyList<ulong> players, int index, int length, CancellationToken token = default)

Parameters

service ISteamApiService
players IReadOnlyList<ulong>
index int
length int
token CancellationToken

Returns

Task<PlayerSummary[]>

Exceptions

SteamApiRequestException

Failed to fetch the data for some reason.

GetPlayerSummariesAsync(ISteamApiService, IReadOnlyList<ulong>, CancellationToken)

Get the PlayerSummary steam API object for multiple players.

public static Task<PlayerSummary[]> GetPlayerSummariesAsync(this ISteamApiService service, IReadOnlyList<ulong> players, CancellationToken token = default)

Parameters

service ISteamApiService
players IReadOnlyList<ulong>
token CancellationToken

Returns

Task<PlayerSummary[]>

Exceptions

SteamApiRequestException

Failed to fetch the data for some reason.

GetPlayerSummaryAsync(ISteamApiService, ulong, CancellationToken)

Get the PlayerSummary steam API object for a single player.

public static Task<PlayerSummary> GetPlayerSummaryAsync(this ISteamApiService service, ulong player, CancellationToken token = default)

Parameters

service ISteamApiService
player ulong
token CancellationToken

Returns

Task<PlayerSummary>

Exceptions

SteamApiRequestException

Failed to fetch the data for some reason.