steam

package
v0.0.0-...-1387fa8 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package steam is wrapper for Steam Web API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OwnedGames

type OwnedGames struct {
	Response OwnedGamesResponse `json:"response"`
}

OwnedGames represents GetOwnedGames response.

func ParseOwnedGames

func ParseOwnedGames(resp *[]byte) (*OwnedGames, error)

ParseOwnedGames parses GetOwnedGames response

type OwnedGamesResponse

type OwnedGamesResponse struct {
	GameCount int                       `json:"game_count"`
	Games     []OwnedGamesResponseGames `json:"games"`
}

OwnedGamesResponse represents GetOwnedGames response wrapped Games.

type OwnedGamesResponseGames

type OwnedGamesResponseGames struct {
	AppID           int `json:"appid"`
	PlaytimeForever int `json:"playtime_forever"`
	Playtime2Weeks  int `json:"playtime_2weeks,omitempty"`
}

OwnedGamesResponseGames represents Game.

type PlayerSummaries

type PlayerSummaries struct {
	Response PlayerSummariesResponse `json:"response"`
}

PlayerSummaries represents GetPlayerSummaries response.

func ParsePlayerSummaries

func ParsePlayerSummaries(resp *[]byte) (*PlayerSummaries, error)

ParsePlayerSummaries parses GetPlayerSummaries response

type PlayerSummariesResponse

type PlayerSummariesResponse struct {
	Players []PlayerSummariesResponsePlayers `json:"players"`
}

PlayerSummariesResponse represents GetPlayerSummaries response wrapped PlayerSummary.

type PlayerSummariesResponsePlayers

type PlayerSummariesResponsePlayers struct {
	SteamID                  string `json:"steamid"`
	CommunityVisibilityState int    `json:"communityvisibilitystate"`
	ProfileState             int    `json:"profilestate"`
	PersonaName              string `json:"personaname"`
	LastLogoff               int    `json:"lastlogoff"`
	ProfileURL               string `json:"profileurl"`
	Avatar                   string `json:"avatar"`
	AvatarMedium             string `json:"avatarmedium"`
	AvatarFull               string `json:"avatarfull"`
	PersonaState             int    `json:"personastate"`
	RealName                 string `json:"realname"`
	PrimaryClanID            string `json:"primaryclanid"`
	TimeCreated              int    `json:"timecreated"`
	PersonaStateFlags        int    `json:"personastateflags"`
	LocCountryCode           string `json:"loccountrycode"`
	LocStateCode             string `json:"locstatecode"`
	LocCityID                int    `json:"loccityid"`
}

PlayerSummariesResponsePlayers represents PlayerSummary.

type Steam

type Steam struct {
	// contains filtered or unexported fields
}

Steam is Steam Web API client.

func NewSteam

func NewSteam(apiKey string) *Steam

NewSteam creates a new Steam Web API client.

func (*Steam) GenerateRequestURI

func (s *Steam) GenerateRequestURI(uri string, query map[string]string) (string, error)

GenerateRequestURI returns URI added key to query for Steam API

func (*Steam) OwnedGames

func (s *Steam) OwnedGames(steamID string) (*OwnedGames, error)

OwnedGames fetches OwnedGames from Steam

func (*Steam) PlayerSummaries

func (s *Steam) PlayerSummaries(steamIDs string) (*PlayerSummaries, error)

PlayerSummaries fetches PlayerSummaries from Steam

Jump to

Keyboard shortcuts

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