internal

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PaleoplayVersion = 2

Functions

func AugmentPost added in v0.1.0

func AugmentPost(postData PostData)

func CloseSteam

func CloseSteam()

func CreatePost

func CreatePost(group ImageGrouping)

func GetSteamId added in v0.1.0

func GetSteamId(game string) (steamId string)

func GroupByProperty

func GroupByProperty[T any, K comparable](items []T, getProperty func(T) K) map[K][]T

func InitSteam

func InitSteam(state []string)

func InitTinify

func InitTinify(tinifyApiKey string)

func Map

func Map[T any, O any](items []T, getProperty func(T) O) []O

func ParseTime

func ParseTime(input string) (time.Time, error)

func ReadState

func ReadState() (state []string)

func Tinify

func Tinify(source string) (result []byte)

func WriteState

func WriteState(state []string)

Types

type App

type App struct {
	Data Data `json:"data"`
}

type AppList added in v0.1.0

type AppList struct {
	Apps []ListedApp `json:"apps"`
}

type AppListResponse added in v0.1.0

type AppListResponse struct {
	AppList AppList `json:"applist"`
}

type Data

type Data struct {
	Genres        []Genre       `json:"genres"`
	Name          string        `json:"name"`
	Developers    []string      `json:"developers"`
	Publishers    []string      `json:"publishers"`
	PriceOverview PriceOverview `json:"price_overview"`
}

type GameApiDetails added in v0.1.0

type GameApiDetails struct {
	Name       string
	Genres     []string
	Price      int
	Developers []string `json:"developers"`
	Publishers []string `json:"publishers"`
}

func GetGameApiDetails added in v0.1.0

func GetGameApiDetails(appId string) GameApiDetails

type GameStoreDetails added in v0.1.0

type GameStoreDetails struct {
	Tags      []string
	Franchise string
}

func GetGameStoreDetails added in v0.1.0

func GetGameStoreDetails(appId string) (details GameStoreDetails, err error)

type Genre

type Genre struct {
	Description string `json:"description"`
}

type Image

type Image struct {
	Source      string
	Destination string
}

type ImageGrouping added in v0.1.0

type ImageGrouping struct {
	SteamId string
	Date    string
	Images  []Image
}

func GroupScreenshots added in v0.1.0

func GroupScreenshots(screenshots []Screenshot) (imageGroupings []ImageGrouping)

type ListedApp added in v0.1.0

type ListedApp struct {
	AppId int    `json:"appid"`
	Name  string `json:"name"`
}

type PostData added in v0.1.0

type PostData struct {
	Date       string   `yaml:"dates"`
	Images     []string `yaml:"images"`
	Game       string   `yaml:"games"`
	Price      float64  `yaml:"price"`
	Genres     []string `yaml:"genres"`
	Developers []string `yaml:"developers"`
	Publishers []string `yaml:"publishers"`
	Franchise  string   `yaml:"franchises"`
	Tags       []string `yaml:"tags"`
	SteamId    string   `yaml:"steamId"`
	Paleoplay  int      `yaml:"paleoplay"`
}

func (*PostData) FileName added in v0.1.0

func (p *PostData) FileName() string

type PriceOverview added in v0.1.0

type PriceOverview struct {
	Initial int `json:"initial"`
}

type Screenshot

type Screenshot struct {
	URL      string
	SteamId  string
	Game     string
	ImageURL string
	Date     time.Time
}

func PullPublicScreenshots

func PullPublicScreenshots(user string) (screenshots []Screenshot)

func PullScreenshot

func PullScreenshot(url string) (screenshot Screenshot)

func (*Screenshot) FileName

func (s *Screenshot) FileName(number int) string

Jump to

Keyboard shortcuts

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