Documentation ¶
Index ¶
- Constants
- type Badge
- type BadgeQuests
- type Client
- type Game
- type GetBadgesParams
- type GetBadgesResult
- type GetCommunityBadgeProgressParams
- type GetCommunityBadgeProgressResult
- type GetOwnedGamesParams
- type GetOwnedGamesResult
- type GetRecentlyPlayedGamesParams
- type GetRecentlyPlayedGamesResult
- type GetSteamLevelParams
- type GetSteamLevelResult
- type IPlayerService
- func (s *IPlayerService) GetBadges(ctx context.Context, params *GetBadgesParams) (*GetBadgesResult, error)
- func (s *IPlayerService) GetCommunityBadgeProgress(ctx context.Context, params *GetCommunityBadgeProgressParams) (*GetCommunityBadgeProgressResult, error)
- func (s *IPlayerService) GetOwnedGames(ctx context.Context, params *GetOwnedGamesParams) (*GetOwnedGamesResult, error)
- func (s *IPlayerService) GetRecentlyPlayedGames(ctx context.Context, params *GetRecentlyPlayedGamesParams) (*GetRecentlyPlayedGamesResult, error)
- func (s *IPlayerService) GetSteamLevel(ctx context.Context, params *GetSteamLevelParams) (*GetSteamLevelResult, error)
- func (s *IPlayerService) IsPlayingSharedGame(ctx context.Context, params *IsPlayingSharedGameParams) (*IsPlayingSharedGameResult, error)
- type IsPlayingSharedGameParams
- type IsPlayingSharedGameResult
- type Query
- type Result
Constants ¶
const (
// APIBase is the URL prefix for the Steamworks Web API
APIBase = "https://api.steampowered.com/"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Badge ¶
type Badge struct { Badgeid int32 `json:"badgeid"` Level int `json:"level"` CompletionTime int `json:"completion_time"` Xp int `json:"xp"` Scarcity int `json:"scarcity"` }
Badge defines the badge in GetBadgesResult.
type BadgeQuests ¶
BadgeQuests defines the quests of GetCommunityBadgeProgressResult.
type Client ¶
type Client struct { IPlayerService *IPlayerService // contains filtered or unexported fields }
Client defines the Steam Client.
type Game ¶
type Game struct { Appid int `json:"appid"` Name string `json:"name"` PlaytimeForever int `json:"playtime_forever"` PlayTime2Weeks int `json:"playtime_2weeks"` ImgIconURL string `json:"img_icon_url"` ImgLogoURL string `json:"img_logo_url"` HasCommunityVisibleStats bool `json:"has_community_visible_stats"` PlaytimeWindowsForever int `json:"playtime_windows_forever"` PlaytimeMacForever int `json:"playtime_mac_forever"` PlaytimeLinuxForever int `json:"playtime_linux_forever"` }
Game defines the game in GetOwnedGamesResult.
type GetBadgesParams ¶
type GetBadgesParams struct { // The player we're asking about SteamID uint64 `json:"steamid"` }
GetBadgesParams defines the parameters to GetRecentlyPlayedGames.
type GetBadgesResult ¶
type GetBadgesResult struct { Badges []*Badge `json:"badges"` PlayerXp int `json:"player_xp"` PlayerLevel int `json:"player_level"` PlayerXpNeededToLevelUp int `json:"player_xp_needed_to_level_up"` PlayerXpNeededCurrentLevel int `json:"player_xp_needed_current_level"` }
GetBadgesResult defines the result of GetRecentlyPlayedGames.
type GetCommunityBadgeProgressParams ¶
type GetCommunityBadgeProgressParams struct { // The player we're asking about SteamID uint64 `json:"steamid"` // The badge we're asking about BadgeID int32 `json:"badgeid"` }
GetCommunityBadgeProgressParams defines the parameters to GetCommunityBadgeProgress.
type GetCommunityBadgeProgressResult ¶
type GetCommunityBadgeProgressResult struct {
Quests []BadgeQuests `json:"quests"`
}
GetCommunityBadgeProgressResult defines the result of GetCommunityBadgeProgress.
type GetOwnedGamesParams ¶
type GetOwnedGamesParams struct { // The player we're asking about SteamID uint64 `json:"steamid"` // true if we want additional details (name, icon) about each game IncludeAppInfo bool `json:"include_appinfo"` // Free games are excluded by default. If this is set, free games the user has played will be returned IncludePlayedFreeGames bool `json:"include_played_free_games"` // if set, restricts result set to the passed in apps, // actually it should passed like appids_filter[0]=8930&appids_filter[1]=500 AppIDsFilter []uint32 `json:"appids_filter"` }
GetOwnedGamesParams defines the parameters to GetRecentlyPlayedGames.
type GetOwnedGamesResult ¶
GetOwnedGamesResult defines the result of GetRecentlyPlayedGames.
type GetRecentlyPlayedGamesParams ¶
type GetRecentlyPlayedGamesParams struct { // The player we're asking about SteamID uint64 `json:"steamid"` // The number of games to return (0/unset: all) Count uint32 `json:"count"` }
GetRecentlyPlayedGamesParams defines the parameters to GetRecentlyPlayedGames.
type GetRecentlyPlayedGamesResult ¶
type GetRecentlyPlayedGamesResult struct { // The number of games TotalCount int `json:"total_count"` // Games []*Game `json:"games"` }
GetRecentlyPlayedGamesResult defines the result of GetRecentlyPlayedGames.
type GetSteamLevelParams ¶
type GetSteamLevelParams struct { // The player we're asking about SteamID uint64 `json:"steamid"` }
GetSteamLevelParams defines the parameters to GetRecentlyPlayedGames.
type GetSteamLevelResult ¶
type GetSteamLevelResult struct {
PlayerLevel uint64 `json:"player_level"`
}
GetSteamLevelResult defines the result of GetRecentlyPlayedGames.
type IPlayerService ¶
type IPlayerService service
IPlayerService provides additional methods for interacting with Steam Users. See https://partner.steamgames.com/doc/webapi/IPlayerService for more information.
func (*IPlayerService) GetBadges ¶
func (s *IPlayerService) GetBadges(ctx context.Context, params *GetBadgesParams) (*GetBadgesResult, error)
GetBadges gets badges that are owned by a specific user.
func (*IPlayerService) GetCommunityBadgeProgress ¶
func (s *IPlayerService) GetCommunityBadgeProgress(ctx context.Context, params *GetCommunityBadgeProgressParams) ( *GetCommunityBadgeProgressResult, error)
GetCommunityBadgeProgress gets all the quests needed to get the specified badge, and which are completed.
func (*IPlayerService) GetOwnedGames ¶
func (s *IPlayerService) GetOwnedGames(ctx context.Context, params *GetOwnedGamesParams) (*GetOwnedGamesResult, error)
GetOwnedGames return a list of games owned by the player.
func (*IPlayerService) GetRecentlyPlayedGames ¶
func (s *IPlayerService) GetRecentlyPlayedGames(ctx context.Context, params *GetRecentlyPlayedGamesParams) (*GetRecentlyPlayedGamesResult, error)
GetRecentlyPlayedGames gets information about a player's recently played games.
func (*IPlayerService) GetSteamLevel ¶
func (s *IPlayerService) GetSteamLevel(ctx context.Context, params *GetSteamLevelParams) (*GetSteamLevelResult, error)
GetSteamLevel returns the Steam Level of a user.
func (*IPlayerService) IsPlayingSharedGame ¶
func (s *IPlayerService) IsPlayingSharedGame(ctx context.Context, params *IsPlayingSharedGameParams) ( *IsPlayingSharedGameResult, error)
IsPlayingSharedGame returns valid lender SteamID if game currently played is borrowed.
type IsPlayingSharedGameParams ¶
type IsPlayingSharedGameParams struct { uint64 `json:"steamid"` AppIDPlaying uint32 `json:"appid_playing"` }SteamID
IsPlayingSharedGameParams defines the parameters to GetRecentlyPlayedGames.
type IsPlayingSharedGameResult ¶
type IsPlayingSharedGameResult struct {
}IsPlayingSharedGameResult defines the result of IsPlayingSharedGame.