stats

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DOMAIN  = "https://oldschool.runescape.com/"
	TIMEOUT = 15
)

Steamcharts constants

View Source
const (
	STEAMDOMAIN = "https://api.steampowered.com"
	// Population
	POPULATIONINTERFACE = "ISteamUserStats"
	POPULATIONFUNCTION  = "GetNumberOfCurrentPlayers"
	POPULATIONVERSION   = "v1"
	IDENTIFIER          = "?appid="
	POPULATIONBASE      = STEAMDOMAIN + "/" + POPULATIONINTERFACE + "/" + POPULATIONFUNCTION + "/" + POPULATIONVERSION + "/" + IDENTIFIER
	// Apps
	APPINTERFACE = "ISteamApps"
	APPFUNCTION  = "GetAppList"
	APPVERSION   = "v2"
	APPBASE      = STEAMDOMAIN + "/" + APPINTERFACE + "/" + APPFUNCTION + "/" + APPVERSION
)

constants

Variables

This section is empty.

Functions

func Fetch

func Fetch(domain string, id int) (int, error)

Fetch returns a pointer to a DailyMetric struct if retrieval process succeeded, otherwise an error is returned

func FetchApps

func FetchApps() (map[string]map[int]string, error)

FetchApps returns a set of appIds

Types

type AppDataContainer

type AppDataContainer struct {
	ID   int    `json:"appid"`
	Name string `json:"name"`
}

type AppListDataContainer

type AppListDataContainer struct {
	Apps []AppDataContainer `json:"apps"`
}

type AppResponseContainer

type AppResponseContainer struct {
	AppList AppListDataContainer `json:"applist"`
}

type DataContainer

type DataContainer struct {
	Count  int `json:"player_count"`
	Result int `json:"result"`
}

DataContainer player container

type ResponseContainer

type ResponseContainer struct {
	Data DataContainer `json:"response"`
}

ResponseContainer json response from steam API

Jump to

Keyboard shortcuts

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