tf2

package
v0.0.0-...-456c657 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2015 License: Zlib Imports: 5 Imported by: 1

Documentation

Overview

Package tf2 deals with scraping data from Team Fortress 2 or other valve source game servers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Player

type Player struct {
	UserID    string `json:"user_id"`
	Name      string `json:"name"`
	UniqueID  string `json:"unique_id"`
	Connected string `json:"connected"`
	State     string `json:"state"`
	Address   string `json:"addr"`
	IsBot     bool   `json:"bot"`
}

Player represents an individual player connected to the server.

type Status

type Status struct {
	Online       bool     `json:"online"`
	Hostname     string   `json:"hostname"`
	Version      string   `json:"version"`
	Tags         string   `json:"tags"`
	Players      []Player `json:"players"`
	HumanPlayers int      `json:"human_players"`
	Bots         int      `json:"bots"`
	MaxPlayers   int      `json:"max_players"`
	MapName      string   `json:"map_name"`
}

Status is the status of the game server.

func Query

func Query(host, password string) (*Status, error)

Jump to

Keyboard shortcuts

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