steam_integration

package
v0.1.36 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 8 Imported by: 5

Documentation

Index

Constants

View Source
const (
	SteamPoweredHost   = "steampowered.com"
	StoreHost          = "store." + SteamPoweredHost
	ApiHost            = "api." + SteamPoweredHost
	SteamCommunityHost = "steamcommunity.com"
)

hosts

Variables

This section is empty.

Functions

func AppDetailsUrl added in v0.1.29

func AppDetailsUrl(appId uint32) *url.URL

func AppListUrl

func AppListUrl() *url.URL

func AppReviewsUrl

func AppReviewsUrl(appId uint32) *url.URL

func DeckAppCompatibilityReportUrl added in v0.1.29

func DeckAppCompatibilityReportUrl(appId uint32) *url.URL

func DecodeCategory added in v0.1.31

func DecodeCategory(category int) string

func DecodeLocToken added in v0.1.30

func DecodeLocToken(token string) string

func DefaultSteamAppListUrl

func DefaultSteamAppListUrl(_ string) *url.URL

DefaultSteamAppListUrl is a vangogh_local_data specific wrapper of steam_integration URL func

func NewsForAppUrl

func NewsForAppUrl(appId uint32) *url.URL

func SteamCommunityUrl

func SteamCommunityUrl(appId uint32) *url.URL

func StorePageUrl

func StorePageUrl(appId uint32) *url.URL

Types

type App

type App struct {
	AppId uint32 `json:"appid"`
	Name  string `json:"name"`
}

type AppList

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

type AppNews

type AppNews struct {
	AppId     uint32     `json:"appid"`
	NewsItems []NewsItem `json:"newsitems"`
	Count     uint32     `json:"count"`
}

type AppReviews

type AppReviews struct {
	Success      int          `json:"success"`
	QuerySummary QuerySummary `json:"query_summary"`
	Reviews      []Review     `json:"reviews"`
	Cursor       string       `json:"cursor"`
}

func (*AppReviews) GetReviewScoreDesc

func (ar *AppReviews) GetReviewScoreDesc() string

type Author

type Author struct {
	SteamId              string `json:"steamid"`
	NumGamesOwned        int    `json:"num_games_owned"`
	NumReviews           int    `json:"num_reviews"`
	PlaytimeForever      int    `json:"playtime_forever"`
	PlaytimeLastTwoWeeks int    `json:"playtime_last_two_weeks"`
	PlaytimeAtReview     int    `json:"playtime_at_review"`
	LastPlayed           int    `json:"last_played"`
}

type DeckAppCompatibilityReport added in v0.1.30

type DeckAppCompatibilityReport struct {
	Success int `json:"success"`
	Results struct {
		AppID            uint32 `json:"appid"`
		ResolvedCategory int    `json:"resolved_category"`
		ResolvedItems    []struct {
			DisplayType int    `json:"display_type"`
			LocToken    string `json:"loc_token"`
		} `json:"resolved_items"`
		SteamDeckBlogUrl string      `json:"steam_deck_blog_url"`
		SearchId         interface{} `json:"search_id"`
	} `json:"results"`
}

func (*DeckAppCompatibilityReport) GetResults added in v0.1.32

func (dacr *DeckAppCompatibilityReport) GetResults() []string

func (*DeckAppCompatibilityReport) GetResultsDisplayTypes added in v0.1.30

func (dacr *DeckAppCompatibilityReport) GetResultsDisplayTypes() []string

func (*DeckAppCompatibilityReport) GetSteamDeckBlogUrl added in v0.1.30

func (dacr *DeckAppCompatibilityReport) GetSteamDeckBlogUrl() string

func (*DeckAppCompatibilityReport) IsSuccess added in v0.1.30

func (dacr *DeckAppCompatibilityReport) IsSuccess() bool

func (*DeckAppCompatibilityReport) String added in v0.1.31

func (dacr *DeckAppCompatibilityReport) String() string

type GetAppListResponse

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

type GetNewsForAppResponse

type GetNewsForAppResponse struct {
	AppNews AppNews `json:"appnews"`
}

type NewsItem

type NewsItem 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          int64    `json:"date"`
	FeedName      string   `json:"feedname"`
	FeedType      int      `json:"feed_type"`
	AppId         uint32   `json:"appid"`
	Tags          []string `json:"tags"`
}

type QuerySummary

type QuerySummary struct {
	NumReviews      int    `json:"num_reviews"`
	ReviewScore     int    `json:"review_score"`
	ReviewScoreDesc string `json:"review_score_desc"`
	TotalPositive   int    `json:"total_positive"`
	TotalNegative   int    `json:"total_negative"`
	TotalReviews    int    `json:"total_reviews"`
}

type Review

type Review struct {
	RecommendationId string `json:"recommendationid"`
	Author           Author `json:"author"`
	Language         string `json:"language"`
	Review           string `json:"review"`
	TimestampCreated int64  `json:"timestamp_created"`
	TimestampUpdated int64  `json:"timestamp_updated"`
	VotedUp          bool   `json:"voted_up"`
	VotesUp          int    `json:"votes_up"`
	VotesFunny       int    `json:"votes_funny"`
	//BUG: Steam weighted_vote_score data contains values like "0.123456789" as well as 0 (no quotes)
	//which means we can't use either string (second value will fail), nor number (first value will fail)
	//skipping it for the time being
	//WeightedVoteScore        string `json:"weighted_vote_score"`
	CommentCount             int  `json:"comment_count"`
	SteamPurchase            bool `json:"steam_purchase"`
	ReceivedForFree          bool `json:"received_for_free"`
	WrittenDuringEarlyAccess bool `json:"written_during_early_access"`
}

type ReviewScoreDescGetter

type ReviewScoreDescGetter interface {
	GetReviewScoreDesc() string
}

type SteamAppIdGetter added in v0.1.20

type SteamAppIdGetter interface {
	GetSteamAppId() uint32
}

type SteamTagsGetter added in v0.1.22

type SteamTagsGetter interface {
	GetSteamTags() []string
}

type SteamUrlFunc

type SteamUrlFunc func(appId uint32) *url.URL

type StorePage added in v0.1.22

type StorePage struct {
	Doc *html.Node
}

func (*StorePage) GetSteamTags added in v0.1.22

func (sp *StorePage) GetSteamTags() []string

Jump to

Keyboard shortcuts

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