models

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppBriefInfo added in v1.0.2

type AppBriefInfo struct {
	ID               int64  `json:"id"`                // 应用ID
	Name             string `json:"name"`              // 应用名称
	Icon             string `json:"icon"`              // 图标地址
	Type             int    `json:"type"`              // 应用类型(游戏/软件) game=1 software=2
	CommunityVisible bool   `json:"community_visible"` // 社区可见性
	Propagation      string `json:"propagation"`       // 传播范围
}

AppBriefInfo 应用信息精简模型

type CartItem added in v1.0.2

type CartItem struct {
	LineItemID     string `json:"line_item_id"`    // 行内ID
	PackageID      int    `json:"package_id"`      // 包裹ID
	Price          string `json:"price"`           // 价格
	FormattedPrice string `json:"formatted_price"` // 格式化的价格
	AddTime        string `json:"add_time"`        // 加入购物车的时间
	IsGift         bool   `json:"is_gift"`         // 是否为礼物
	IsPrivate      bool   `json:"is_private"`      // 是否私有
}

CartItem Cart Item Model

type GetAppsResponse added in v1.0.2

type GetAppsResponse struct {
	Response struct {
		Apps []struct {
			AppID                            int64  `json:"appid"`                             // 应用唯一标识
			Name                             string `json:"name"`                              // 应用名称
			Icon                             string `json:"icon"`                              // 应用图标哈希值
			CommunityVisibleStats            bool   `json:"community_visible_stats,omitempty"` // 是否显示社区统计
			Propagation                      string `json:"propagation"`                       // 传播范围
			AppType                          int    `json:"app_type"`                          // 应用类型标识
			ContentDescriptorIDs             []int  `json:"content_descriptorids"`
			ContentDescriptorIDsIncludingDLC []int  `json:"content_descriptorids_including_dlc"`
		} `json:"apps"` // 应用列表
	} `json:"response"` // 接口响应主体
}

GetAppsResponse ICommunityService/GetApps

type OwnedGame

type OwnedGame struct {
	AppID                  uint64 `json:"app_id"`               // 游戏ID
	Name                   string `json:"name"`                 // 游戏名称
	PlaytimeForever        int    `json:"playtime_forever"`     // 总游玩时长(分钟)
	Playtime2Weeks         int    `json:"playtime_2weeks"`      // 近2周游玩时长(分钟)
	IconURL                string `json:"icon_url"`             // 游戏图标完整URL
	CapsuleURL             string `json:"capsule_url"`          // 游戏封面完整URL
	LastPlayedTime         int64  `json:"last_played_time"`     // 最后游玩时间戳
	LastPlayedTimeStr      string `json:"last_played_time_str"` // 最后游玩时间格式化字符串
	HasCommunityVisible    bool   `json:"has_community_visb"`   // 社区可见性
	PlaytimeWindowsForever int    `json:"playtime_windows"`     // Windows端时长
	PlaytimeDeckForever    int    `json:"playtime_deck"`        // SteamDeck端时长
	HasDLC                 bool   `json:"has_dlc"`              // 是否有DLC
}

OwnedGame 玩家已拥有游戏信息精简模型

type Player

type Player struct {
	SteamID      string `json:"steam_id"`      // Steam唯一ID
	PersonaName  string `json:"persona_name"`  // 昵称
	ProfileURL   string `json:"profile_url"`   // 个人主页链接
	AvatarURL    string `json:"avatar_url"`    // 小尺寸头像
	AvatarMedium string `json:"avatar_medium"` // 半尺寸头像
	AvatarFull   string `json:"avatar_full"`   // 全尺寸头像
	TimeCreated  string `json:"time_created"`  // 账号创建时间
	LastLogoff   string `json:"last_logoff"`   // 最后离线时间
	IsOnline     bool   `json:"is_online"`     // 是否在线
	RealName     string `json:"real_name"`     // 真实姓名
	CountryCode  string `json:"country_code"`  // 国家码
}

Player 用户基本信息精简模型

type PlayerAchievement

type PlayerAchievement struct {
	SteamID         string `json:"steam_id"`         // 玩家SteamID
	GameName        string `json:"game_name"`        // 游戏名称
	AppID           uint64 `json:"app_id"`           // 游戏ID
	AchievementAPI  string `json:"achievement_api"`  // 成就唯一标识
	AchievementName string `json:"achievement_name"` // 成就名称
	Achieved        bool   `json:"achieved"`         // 是否完成
	UnlockTime      int64  `json:"unlock_time"`      // 解锁时间戳
	UnlockTimeStr   string `json:"unlock_time_str"`  // 解锁时间格式化字符串
	Description     string `json:"description"`      // 成就描述
}

PlayerAchievement 玩家游戏成就精简模型

type SteamOwnedGamesResponse

type SteamOwnedGamesResponse struct {
	Response struct {
		GameCount int `json:"game_count"` // 游戏总数
		Games     []struct {
			AppID                  uint64 `json:"appid"`                       // 游戏唯一ID
			Name                   string `json:"name"`                        // 游戏名称
			Playtime2Weeks         int    `json:"playtime_2weeks"`             // 近2周游玩时长(分钟)
			PlaytimeForever        int    `json:"playtime_forever"`            // 总游玩时长(分钟)
			ImgIconURL             string `json:"img_icon_url"`                // 游戏图标哈希(小图标)
			HasCommunityVisible    bool   `json:"has_community_visible_stats"` // 是否显示社区统计
			PlaytimeWindowsForever int    `json:"playtime_windows_forever"`    // Windows端总时长
			PlaytimeMacForever     int    `json:"playtime_mac_forever"`        // Mac端总时长
			PlaytimeLinuxForever   int    `json:"playtime_linux_forever"`      // Linux端总时长
			PlaytimeDeckForever    int    `json:"playtime_deck_forever"`       // SteamDeck端总时长
			RTimeLastPlayed        int64  `json:"rtime_last_played"`           // 最后游玩时间戳
			CapsuleFilename        string `json:"capsule_filename"`            // 封面图文件名
			HasWorkshop            bool   `json:"has_workshop"`                // 是否有创意工坊
			HasMarket              bool   `json:"has_market"`                  // 是否有市场
			HasDLC                 bool   `json:"has_dlc"`                     // 是否有DLC
			ContentDescriptorIDs   []int  `json:"content_descriptorids"`
			PlaytimeDisconnected   int    `json:"playtime_disconnected"` // 离线游玩时长
		} `json:"games"`
	} `json:"response"`
}

SteamOwnedGamesResponse IPlayerService/GetOwnedGames

type SteamPlayerAchievementsResponse

type SteamPlayerAchievementsResponse struct {
	PlayerStats struct {
		SteamID      string `json:"steamID"`  // 玩家SteamID
		GameName     string `json:"gameName"` // 游戏名称
		Achievements []struct {
			APIName     string `json:"apiname"`     // 成就唯一标识
			Achieved    int    `json:"achieved"`    // 是否完成: 1=完成, 0=未完成
			UnlockTime  int64  `json:"unlocktime"`  // 解锁时间戳
			Name        string `json:"name"`        // 成就名称
			Description string `json:"description"` // 成就描述
		} `json:"achievements"`
		Success bool `json:"success"` // 请求是否成功
	} `json:"playerstats"`
}

SteamPlayerAchievementsResponse ISteamUserStats/GetPlayerAchievements

type SteamPlayerResponse

type SteamPlayerResponse struct {
	Response struct {
		Players []struct {
			SteamID                  string `json:"steamid"`                  // Steam 账号唯一 ID
			CommunityVisibilityState int    `json:"communityvisibilitystate"` // 社区可见性
			ProfileState             int    `json:"profilestate"`
			PersonaName              string `json:"personaname"`       // 用户显示名称
			CommentPermission        int    `json:"commentpermission"` // 评论权限: 1=允许, 0=禁止
			ProfileURL               string `json:"profileurl"`        // 个人主页地址
			Avatar                   string `json:"avatar"`            // 小尺寸头像URL
			AvatarMedium             string `json:"avatarmedium"`      // 半尺寸头像URL
			AvatarFull               string `json:"avatarfull"`        // 全尺寸头像URL
			AvatarHash               string `json:"avatarhash"`        // 头像哈希值
			LastLogoff               int64  `json:"lastlogoff"`        // 最后离线时间戳
			PersonaState             int    `json:"personastate"`      // 在线状态: 0=离线 1=在线
			RealName                 string `json:"realname"`          // 真实姓名(用户填写)
			PrimaryClanID            string `json:"primaryclanid"`     // 主要所属群组 ID
			TimeCreated              int64  `json:"timecreated"`       // 账号创建时间戳
			PersonaStateFlags        int    `json:"personastateflags"`
			LocCountryCode           string `json:"loccountrycode"` // 国家码
			LocStateCode             string `json:"locstatecode"`   // 省份/州码
			LocCityID                int    `json:"loccityid"`      // 城市ID
		} `json:"players"`
	} `json:"response"`
}

SteamPlayerResponse ISteamUser/GetPlayerSummaries

type SteamServerResponse

type SteamServerResponse struct {
	Server a2s.ServerInfo `json:"server"`
	Player a2s.PlayerInfo `json:"player"`
	Rules  a2s.RulesInfo  `json:"rules"`
}

SteamServerResponse 服务器数据模型

type SteamStoreTokenResponse added in v1.0.2

type SteamStoreTokenResponse struct {
	Data struct {
		WebapiToken string `json:"webapi_token"` // 成就唯一标识
	} `json:"data"`
	Success int `json:"success"` // 请求是否成功
}

SteamStoreTokenResponse Steam token model

type SteamUserCartResponse added in v1.0.2

type SteamUserCartResponse struct {
	Response struct {
		Cart struct {
			LineItems []struct {
				LineItemID     string `json:"line_item_id"`
				Type           int    `json:"type"`
				PackageID      int    `json:"packageid"`  // 促销包裹ID
				IsValid        bool   `json:"is_valid"`   // 是否有效
				TimeAdded      int64  `json:"time_added"` // 添加时间
				PriceWhenAdded struct {
					AmountInCents   string `json:"amount_in_cents"`  // 价格
					CurrencyCode    int    `json:"currency_code"`    // 货币码
					FormattedAmount string `json:"formatted_amount"` // 格式化金额
				} `json:"price_when_added"` // 添加时的价格
				Flags struct {
					IsGift    bool `json:"is_gift"`    // 是否为礼物
					IsPrivate bool `json:"is_private"` // 是否私有
				} `json:"flags"` // 标识
			} `json:"line_items"` // 购物车行项目列表
			Subtotal struct {
				AmountInCents   string `json:"amount_in_cents"`  // 小计金额
				CurrencyCode    int    `json:"currency_code"`    // 货币编码
				FormattedAmount string `json:"formatted_amount"` // 格式化小计金额
			} `json:"subtotal"` // 购物车小计
			IsValid bool `json:"is_valid"` // 购物车是否有效
		} `json:"cart"` // 购物车信息
	} `json:"response"` // 响应主体
}

SteamUserCartResponse IPlayerService/GetOwnedGames

type SubscriptionBillCountResponse added in v1.0.2

type SubscriptionBillCountResponse struct {
	Response struct {
		ActiveSubscriptionsCount   int64 `json:"active_subscriptions_count"`   // 激活的订阅数量
		InactiveSubscriptionsCount int64 `json:"inactive_subscriptions_count"` // 未激活的订阅数量
	} `json:"response"`
}

SubscriptionBillCountResponse IBillingService/GetRecurringSubscriptionsCount

type UserCart added in v1.0.2

type UserCart struct {
	Items          []CartItem `json:"items"`           // 购物车物品
	TotalPrice     string     `json:"total_price"`     // 总价
	FormattedTotal string     `json:"formatted_total"` // 格式化的总价
}

UserCart IPlayerService/GetOwnedGames 精简模型, 购物车信息

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL