SteamApi.Models
1.1.1
dotnet add package SteamApi.Models --version 1.1.1
NuGet\Install-Package SteamApi.Models -Version 1.1.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SteamApi.Models" Version="1.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SteamApi.Models" Version="1.1.1" />
<PackageReference Include="SteamApi.Models" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SteamApi.Models --version 1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SteamApi.Models, 1.1.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SteamApi.Models@1.1.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SteamApi.Models&version=1.1.1
#tool nuget:?package=SteamApi.Models&version=1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SteamApi.Models
Data transfer objects (DTOs) for Steam Web API responses.
Overview
This package provides strongly-typed models for working with Steam Web API responses. It includes models for:
- Player Information: User profiles, friends, bans, owned games
- Game Information: News, achievements, app lists
- Store Information: App details, requirements, screenshots, movies
- Response Wrappers: Standardized response structures
- Status Information: API health and configuration status
Installation
dotnet add package SteamApi.Models
Usage
These models are designed to work with the Steam Web API responses. They can be used independently or with the SteamApi.Client package.
Player Models
using SteamApi.Models.Steam.Player;
using SteamApi.Models.Steam.Responses;
// Player summary information
var player = new PlayerSummary
{
SteamId = "76561198000000000",
PersonaName = "PlayerName",
ProfileUrl = "https://steamcommunity.com/profiles/76561198000000000",
Status = PlayerStatus.Online,
LastLogoff = 1640995200, // Unix timestamp
TimeCreated = 1640995200 // Unix timestamp
};
// Player ban information
var bans = new PlayerBans
{
SteamId = "76561198000000000",
VacBanned = false,
NumberOfVacBans = 0,
CommunityBanned = false
};
Game Models
using SteamApi.Models.Steam.Game;
using SteamApi.Models.Steam.Responses;
// Game news
var news = new GameNews
{
Gid = "123456",
Title = "Game Update Released",
Url = "https://steamcommunity.com/games/123456/news/123456",
Author = "Developer",
Date = DateTime.UtcNow
};
// Achievement information
var achievement = new Achievement
{
ApiName = "ACHIEVEMENT_NAME",
Name = "Achievement Display Name",
Description = "Achievement description",
Achieved = true,
GlobalPercentage = 15.5,
UnlockTime = 1640995200 // Unix timestamp
};
Store Models
using SteamApi.Models.Steam.Store;
// Store app details
var appDetails = new StoreAppDetails
{
Type = "game",
Name = "Path of Exile",
SteamAppId = 238960,
IsFree = true,
ControllerSupport = "full",
DetailedDescription = "Chris Wilson...",
ShortDescription = "Path of Exile is an online Action RPG...",
HeaderImage = "https://shared.akamai.steamstatic.com/...",
Website = "http://www.pathofexile.com",
Developers = new List<string> { "Grinding Gear Games" },
Publishers = new List<string> { "Grinding Gear Games" }
};
// Store requirements
var requirements = new StoreRequirements
{
Minimum = "<strong>Minimum:</strong><br>...",
Recommended = "<strong>Recommended:</strong><br>..."
};
// Store platforms
var platforms = new StorePlatforms
{
Windows = true,
Mac = true,
Linux = false
};
Response Wrappers
using SteamApi.Models.Steam.Responses;
// Wrapped response for player summaries
var response = new SteamResponse<PlayerSummariesResponse>
{
Response = new PlayerSummariesResponse
{
Players = new List<PlayerSummary>
{
new PlayerSummary { SteamId = "76561198000000000", PersonaName = "Player1" },
new PlayerSummary { SteamId = "76561198000000001", PersonaName = "Player2" }
}
}
};
Model Categories
Player Models (SteamApi.Models.Steam.Player
)
PlayerSummary
- Basic user profile informationPlayerBans
- User ban informationFriend
- Friend list informationOwnedGame
- User's owned gamesRecentlyPlayedGame
- Recently played games
Game Models (SteamApi.Models.Steam.Game
)
GameNews
- Game news articlesAchievement
- Game achievement informationSteamApp
- Basic Steam application information
Store Models (SteamApi.Models.Steam.Store
)
StoreAppDetails
- Detailed app information from Steam storeStoreAppDetailsResponse
- Store API response wrapperStoreRequirements
- System requirements for different platformsStorePlatforms
- Supported platforms informationStorePackageGroup
- Package and subscription informationStoreSubscription
- Individual subscription detailsStoreMetacritic
- Metacritic review informationStoreCategory
- App categoriesStoreGenre
- App genresStoreScreenshot
- App screenshotsStoreMovie
- App videos and trailersStoreAchievements
- App achievements informationStoreReleaseDate
- Release date informationStoreSupportInfo
- Support contact informationStoreContentDescriptors
- Content rating informationStoreRating
- Regional rating information
Response Models (SteamApi.Models.Steam.Responses
)
SteamResponse<T>
- Generic response wrapperPlayerSummariesResponse
- Player summaries endpoint responsePlayerBansResponse
- Player bans endpoint responseFriendListResponse
- Friend list endpoint responseOwnedGamesResponse
- Owned games endpoint responseRecentlyPlayedGamesResponse
- Recently played games endpoint responseGameNewsResponse
- Game news endpoint responseAchievementPercentagesResponse
- Achievement percentages endpoint responseAppListResponse
- App list endpoint response
Status Models (SteamApi.Models.Status
)
StatusResponse
- API status information
Features
- Strongly Typed: All models are strongly typed with proper C# conventions
- XML Documentation: Full IntelliSense support with XML documentation
- Nullable Reference Types: Proper null handling with nullable reference types
- Steam API Compatible: Models match Steam Web API response structures
- Unix Timestamps: Timestamp fields use
ulong
to match Steam API format, epoch seconds - Cross-Platform: Works on .NET 8+ on any platform
- No Dependencies: Zero external dependencies for maximum compatibility
Related Packages
- SteamApi.Client - HTTP client that uses these models
- Steam API Service - The .NET service that returns these models
Source Code
- GitHub Repository - Main repository
- GitLab Repository - Mirror repository
License
MIT License - see LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SteamApi.Models:
Package | Downloads |
---|---|
SteamApi.Client
Client library for Steam API .NET service |
GitHub repositories
This package is not used by any popular GitHub repositories.