steam

package
v0.0.0-...-3f13264 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is an API client that interacts with the Steam API.

func New

func New(key string, opts ...Option) (*Client, error)

New creates a new Steam client.

func (*Client) GetOwnedGames

func (c *Client) GetOwnedGames(ctx context.Context, id string) (*OwnedGames, error)

GetOwnedGames fetches a Steam user's owned games.

type Option

type Option func(*Client)

Option conigures a Steam client.

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

WithHTTPClient sets a Steam client's underlying HTTP client.

type OwnedGame

type OwnedGame struct {
	AppID           int `json:"appid"`
	Playtime2Weeks  int `json:"playtime_2weeks"`
	PlaytimeForever int `json:"playtime_forever"`
}

OwnedGame represents a game a Steam user owns.

type OwnedGames

type OwnedGames struct {
	GameCount int          `json:"game_count"`
	Games     []*OwnedGame `json:"games"`
}

OwnedGames represents the list of games a Steam user owns.

Jump to

Keyboard shortcuts

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