Documentation
¶
Overview ¶
Package util 提供 Steam 开发工具类服务 包含各类开发者常用的工具方法, 如 Steam 令牌/API Key 获取等 辅助开发者快速获取 Steam 接口调用所需的认证信息 Package util provides Steam development tooling services Includes various commonly used utility methods for developers, such as Steam token/API Key acquisition, etc., helping developers quickly obtain authentication information required for Steam interface calls
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UtilService ¶
type UtilService struct {
// contains filtered or unexported fields
}
UtilService is the core structure of Steam utility service 工具服务核心结构体 mainly used to assist in obtaining various tokens and keys required for Steam interface calls
func NewUtilService ¶
func NewUtilService(c *client.Client) *UtilService
NewUtilService 创建UtilService实例, 暴露初始化入口
func (*UtilService) GetAPIKey ¶
func (s *UtilService) GetAPIKey()
GetAPIKey 获取 Steam 开发者 API Key 指引开发者通过 Steam 开发者页面申请 API Key, 该 Key 是调用 Steam Web API 的核心认证信息, 申请前需确保账号已登录且绑定域名 操作步骤:
- 确保 Steam 账号已网页登录
- 自动打开 API Key 申请页面
- 按页面指引完成 API Key 申请和绑定
GetAPIKey gets the Steam developer API Key Guides developers to apply for an API Key through the Steam developer page, the Key is core authentication information for calling the Steam Web API, and the account must be logged in and bound to a domain name before application Operation steps:
- Ensure the Steam account is logged in via web
- Automatically open the API Key application page
- Complete API Key application and binding according to page guidance
func (*UtilService) GetCommunityToken ¶
func (s *UtilService) GetCommunityToken()
GetCommunityToken 获取 Steam 社区令牌(loyalty_webapi_token) 指引开发者通过网页登录 Steam 后, 使用 JS 脚本从社区页面提取社区令牌, 该令牌有效期为 1 天, 该令牌是调用 Steam 社区相关接口的关键认证信息 操作步骤:
- 确保 Steam 账号已网页登录
- 自动打开社区令牌获取页面
- 按 F12 打开控制台, 执行指定 JS 脚本提取令牌
GetCommunityToken gets the Steam Community token (loyalty_webapi_token) Guides developers to extract the Community token from the community page using JS scripts after logging in to Steam via web, the token is valid for 1 day and is key authentication information for calling Steam Community-related interfaces Operation steps:
- Ensure the Steam account is logged in via web
- Automatically open the Community token acquisition page
- Press F12 to open the console and execute the specified JS script to extract the token
func (*UtilService) GetStoreToken ¶
func (s *UtilService) GetStoreToken()
GetStoreToken 获取 Steam 商店令牌(Webapi_token) 指引开发者通过网页登录 Steam 后, 从指定页面的 JSON 响应中提取 Store 令牌, 该令牌有效期为 1 天, 是调用 Steam 商店相关接口的关键认证信息 操作步骤:
- 确保 Steam 账号已网页登录
- 自动打开令牌获取页面
- 从 JSON 响应中提取 "Webapi_token" 字段值
GetStoreToken gets the Steam Store token (Webapi_token) Guides developers to extract the Store token from the JSON response of the specified page after logging in to Steam via web, the token is valid for 1 day and is key authentication information for calling Steam Store-related interfaces Operation steps:
- Ensure the Steam account is logged in via web
- Automatically open the token acquisition page
- Extract the value of the "Webapi_token" field from the JSON response