steam

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const URL = "http://api.steampowered.com/ISteamNews/GetNewsForApp/v0002"

Variables

This section is empty.

Functions

This section is empty.

Types

type SteamProto

type SteamProto interface {
	GetSteamNews(req SteamRequest) (response SteamResponse, err error)
}

func NewSteam

func NewSteam() SteamProto

type SteamRequest

type SteamRequest struct {
	Appid     string
	Count     string
	MaxLength string
	Format    string
}

type SteamResponse

type SteamResponse struct {
	Appnews struct {
		Appid     int `json:"appid"`
		Newsitems []struct {
			Gid           string `json:"gid"`
			Title         string `json:"title"`
			URL           string `json:"url"`
			IsExternalURL bool   `json:"is_external_url"`
			Author        string `json:"author"`
			Contents      string `json:"contents"`
			Feedlabel     string `json:"feedlabel"`
			Date          int    `json:"date"`
			Feedname      string `json:"feedname"`
			FeedType      int    `json:"feed_type"`
			Appid         int    `json:"appid"`
		} `json:"newsitems"`
		Count int `json:"count"`
	} `json:"appnews"`
}

Jump to

Keyboard shortcuts

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