gog_integration

package
v0.3.75 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: AGPL-3.0 Imports: 14 Imported by: 12

Documentation

Index

Constants

View Source
const (
	AccountSortByTitle        AccountSortOrder = "title"
	AccountSortByPurchaseDate                  = "date_purchased"
	AccountSortByTags                          = "tags"
	AccountSortByOldestFirst                   = "release_date_asc"
	AccountSortByNewestFirst                   = "release_date_asc"
)
View Source
const (
	CatalogProductStateDefault     = "default"
	CatalogProductStateComingSoon  = "coming-soon"
	CatalogProductStateEarlyAccess = "early-access"
	CatalogProductStatePreOrder    = "preorder"
)
View Source
const (
	Ascending  = "asc"
	Descending = "desc"
)
View Source
const (
	PngExt = ".png"
	JpgExt = ".jpg"
)
View Source
const (
	OrderStatusGiftByMe  = "gift_by_me"
	OrderStatusGiftForMe = "gift_for_me"
	OrderStatusPurchase  = "purchase"
	OrderStatusRefund    = "refund"
)
View Source
const (
	GogHost    = "gog.com"
	WwwGogHost = "www." + GogHost
)

hosts

View Source
const CatalogPagesProductsLimit = 100
View Source
const (
	GogGameInfoFilenameTemplate = "goggame-{id}.info"
)

Variables

View Source
var ErrNotLoggedIn = errors.New("user is not logged in, run import-cookies")

Functions

func AccountPageUrl

func AccountPageUrl(page string) *url.URL

func AddTagUrl

func AddTagUrl(productId, tagId string) *url.URL

func AddToWishlist

func AddToWishlist(
	httpClient *http.Client,
	ids ...string) error

func AddToWishlistUrl

func AddToWishlistUrl(id string) *url.URL

func AllLanguageCodes added in v0.1.94

func AllLanguageCodes() iter.Seq[string]

func ApiProductUrl added in v0.2.6

func ApiProductUrl(id string) *url.URL

func CatalogOrder

func CatalogOrder(sortBy CatalogSortOrder, desc bool) string

func CatalogPageUrl

func CatalogPageUrl(searchAfter string) *url.URL

func CreateTagUrl

func CreateTagUrl(name string) *url.URL

func DefaultLicencesUrl

func DefaultLicencesUrl(_ string) *url.URL

func DefaultUrl added in v0.3.70

func DefaultUrl() *url.URL

func DefaultUserWishlistUrl

func DefaultUserWishlistUrl(_ string) *url.URL

func DeleteTagUrl

func DeleteTagUrl(tagId string) *url.URL

func DetailsUrl

func DetailsUrl(id string) *url.URL

func DreamlistPageUrl added in v0.1.98

func DreamlistPageUrl(page string) *url.URL

func GamesDbGenericExternalReleaseUrl added in v0.1.86

func GamesDbGenericExternalReleaseUrl(id string) *url.URL

func GamesDbGogExternalReleaseUrl added in v0.1.86

func GamesDbGogExternalReleaseUrl(id string) *url.URL

func ImageId

func ImageId(imageUrl string) string

func ImageIds added in v0.2.11

func ImageIds(imageUrls ...string) []string

func ImageUrl

func ImageUrl(imageId, ext string) (*url.URL, error)

func IsLoggedIn added in v0.1.94

func IsLoggedIn(client *http.Client) error

func LanguageCodeByNativeName added in v0.1.94

func LanguageCodeByNativeName(name string) string

func LanguageCodesCloValues added in v0.3.13

func LanguageCodesCloValues() []string

func LanguageNativeName added in v0.3.31

func LanguageNativeName(langCode string) string

func LicencesUrl

func LicencesUrl() *url.URL

func ManualDownloadUrl

func ManualDownloadUrl(manualDownload string) *url.URL

func OrdersPageUrl

func OrdersPageUrl(page string) *url.URL

func RemoveFromWishlist

func RemoveFromWishlist(
	httpClient *http.Client,
	ids ...string) error

func RemoveFromWishlistUrl

func RemoveFromWishlistUrl(id string) *url.URL

func RemoveTagUrl

func RemoveTagUrl(productId, tagId string) *url.URL

func ScreenshotsJpgUrls

func ScreenshotsJpgUrls(screenshots []string) ([]*url.URL, error)

func UpdateTagsUrl

func UpdateTagsUrl(tagsJson string) *url.URL

func UserAccessTokenUrl added in v0.1.98

func UserAccessTokenUrl() *url.URL

func UserDataUrl

func UserDataUrl() *url.URL

func UserWishlistUrl

func UserWishlistUrl() *url.URL

Types

type AccountPage

type AccountPage struct {
	TotalPages                 int              `json:"totalPages"`
	Page                       int              `json:"page"`
	SortBy                     string           `json:"sortBy"`
	TotalProducts              int              `json:"totalProducts"`
	ProductsPerPage            int              `json:"productsPerPage"`
	MoviesCount                int              `json:"moviesCount"`
	Tags                       []accountTag     `json:"tags"`
	Products                   []AccountProduct `json:"products"`
	UpdatedProductsCount       int              `json:"updatedProductsCount"`
	HiddenUpdatedProductsCount int              `json:"hiddenUpdatedProductsCount"`
	AppliedFilters             struct {
		Tags []struct {
			Id           string `json:"id"`
			Name         string `json:"name"`
			ProductCount string `json:"productCount"`
		} `json:"tags"`
	} `json:"appliedFilters"`
	HasHiddenProducts bool `json:"hasHiddenProducts"`
}

func (*AccountPage) GetTagIds

func (app *AccountPage) GetTagIds() []string

func (*AccountPage) GetTagNames

func (app *AccountPage) GetTagNames(tagIds []string) map[string]string

func (*AccountPage) GetTotalPages

func (app *AccountPage) GetTotalPages() int

type AccountProduct

type AccountProduct struct {
	IsGalaxyCompatible bool     `json:"isGalaxyCompatible"`
	Tags               []string `json:"tags"`
	Id                 int      `json:"id"`
	Availability       struct {
		IsAvailable          bool `json:"isAvailable"`
		IsAvailableInAccount bool `json:"isAvailableInAccount"`
	} `json:"availability"`
	Title   string `json:"title"`
	Image   string `json:"image"`
	Url     string `json:"url"`
	WorksOn struct {
		Windows bool `json:"Windows"`
		Mac     bool `json:"Mac"`
		Linux   bool `json:"Linux"`
	} `json:"worksOn"`
	Category     string `json:"category"`
	Rating       int    `json:"rating"`
	IsComingSoon bool   `json:"isComingSoon"`
	IsMovie      bool   `json:"isMovie"`
	IsGame       bool   `json:"isGame"`
	Slug         string `json:"slug"`
	Updates      int    `json:"updates"`
	IsNew        bool   `json:"isNew"`
	DlcCount     int    `json:"dlcCount"`
	ReleaseDate  struct {
		Date         string `json:"date"`
		TimezoneType int    `json:"timezone_type"`
		Timezone     string `json:"timezone"`
	} `json:"releaseDate"`
	IsBaseProductMissing bool `json:"isBaseProductMissing"`
	IsHidingDisabled     bool `json:"isHidingDisabled"`
	IsInDevelopment      bool `json:"isInDevelopment"`
	IsHidden             bool `json:"isHidden"`
}

func (*AccountProduct) GetGlobalRelease

func (ap *AccountProduct) GetGlobalRelease() string

func (*AccountProduct) GetImage

func (ap *AccountProduct) GetImage() string

func (*AccountProduct) GetOperatingSystems

func (ap *AccountProduct) GetOperatingSystems() []string

func (*AccountProduct) GetRating

func (ap *AccountProduct) GetRating() string

func (*AccountProduct) GetSlug

func (ap *AccountProduct) GetSlug() string

func (*AccountProduct) GetStoreUrl

func (ap *AccountProduct) GetStoreUrl() string

func (*AccountProduct) GetTagIds

func (ap *AccountProduct) GetTagIds() []string

func (*AccountProduct) GetTitle

func (ap *AccountProduct) GetTitle() string

type AccountSortOrder

type AccountSortOrder string

type AddRemoveTagResp

type AddRemoveTagResp struct {
	Success bool `json:"success"`
}

type AmountCurrency

type AmountCurrency struct {
	Amount   string `json:"amount"`
	Currency string `json:"currency"`
}

type ApiProduct added in v0.2.6

type ApiProduct struct {
	InDevelopment struct {
		Active bool `json:"active"`
	} `json:"inDevelopment"`
	Copyrights             string `json:"copyrights"`
	IsUsingDosBox          bool   `json:"isUsingDosBox"`
	Description            string `json:"description"`
	Size                   int    `json:"size"`
	Overview               string `json:"overview"`
	FeaturesDescription    string `json:"featuresDescription"`
	AdditionalRequirements string `json:"additionalRequirements"`
	Links                  links  `json:"_links"`
	Embedded               struct {
		Product                   product                    `json:"product"`
		ProductType               string                     `json:"productType"`
		Localizations             []localization             `json:"localizations"`
		Videos                    []video                    `json:"videos"`
		Bonuses                   []bonus                    `json:"bonuses"`
		Screenshots               []screenshot               `json:"screenshots"`
		Publisher                 name                       `json:"publisher"`
		Developers                []name                     `json:"developers"`
		SupportedOperatingSystems []supportedOperatingSystem `json:"supportedOperatingSystems"`
		Tags                      []tag                      `json:"tags"`
		Properties                []property                 `json:"properties"`
		ESRBRating                esrbRating                 `json:"esrbRating"`
		PEGIRating                pegiRating                 `json:"pegiRating"`
		USKRating                 uskRating                  `json:"uskRating"`
		BRRating                  brRating                   `json:"brRating"`
		Features                  []struct {
			Id string `json:"id"`
			// contains filtered or unexported fields
		} `json:"features"`
		Editions []edition `json:"editions"`
		Series   struct {
			Id int `json:"id"`
			// contains filtered or unexported fields
		} `json:"series"`
	} `json:"_embedded"`
}

func (*ApiProduct) GetAdditionalRequirements added in v0.2.6

func (ap *ApiProduct) GetAdditionalRequirements() string

func (*ApiProduct) GetBackground added in v0.2.6

func (ap *ApiProduct) GetBackground() string

func (*ApiProduct) GetCopyrights added in v0.2.6

func (ap *ApiProduct) GetCopyrights() string

func (*ApiProduct) GetDescriptionFeatures added in v0.2.6

func (ap *ApiProduct) GetDescriptionFeatures() string

func (*ApiProduct) GetDescriptionOverview added in v0.2.6

func (ap *ApiProduct) GetDescriptionOverview() string

func (*ApiProduct) GetDevelopers added in v0.2.6

func (ap *ApiProduct) GetDevelopers() []string

func (*ApiProduct) GetFeatures added in v0.2.6

func (ap *ApiProduct) GetFeatures() []string

func (*ApiProduct) GetForumUrl added in v0.2.6

func (ap *ApiProduct) GetForumUrl() string

func (*ApiProduct) GetGOGRelease added in v0.2.6

func (ap *ApiProduct) GetGOGRelease() string

func (*ApiProduct) GetGenres added in v0.2.6

func (ap *ApiProduct) GetGenres() []string

func (*ApiProduct) GetGlobalRelease added in v0.2.6

func (ap *ApiProduct) GetGlobalRelease() string

func (*ApiProduct) GetHero added in v0.2.6

func (ap *ApiProduct) GetHero() string

func (*ApiProduct) GetIcon added in v0.2.6

func (ap *ApiProduct) GetIcon() string

func (*ApiProduct) GetIconSquare added in v0.2.6

func (ap *ApiProduct) GetIconSquare() string

func (*ApiProduct) GetId added in v0.2.6

func (ap *ApiProduct) GetId() int

func (*ApiProduct) GetImage added in v0.2.6

func (ap *ApiProduct) GetImage() string

func (*ApiProduct) GetInDevelopment added in v0.2.6

func (ap *ApiProduct) GetInDevelopment() bool

func (*ApiProduct) GetIncludesGames added in v0.2.6

func (ap *ApiProduct) GetIncludesGames() []string

func (*ApiProduct) GetIsIncludedInGames added in v0.2.6

func (ap *ApiProduct) GetIsIncludedInGames() []string

func (*ApiProduct) GetIsModifiedByGames added in v0.2.90

func (ap *ApiProduct) GetIsModifiedByGames() []string

func (*ApiProduct) GetIsRequiredByGames added in v0.2.6

func (ap *ApiProduct) GetIsRequiredByGames() []string

func (*ApiProduct) GetLanguageCodes added in v0.2.6

func (ap *ApiProduct) GetLanguageCodes() []string
func (ap *ApiProduct) GetLogo() string

func (*ApiProduct) GetModifiesGames added in v0.2.90

func (ap *ApiProduct) GetModifiesGames() []string

func (*ApiProduct) GetOperatingSystems added in v0.2.6

func (ap *ApiProduct) GetOperatingSystems() []string

func (*ApiProduct) GetPreOrder added in v0.2.6

func (ap *ApiProduct) GetPreOrder() bool

func (*ApiProduct) GetProductType added in v0.2.6

func (ap *ApiProduct) GetProductType() string

func (*ApiProduct) GetPublishers added in v0.2.6

func (ap *ApiProduct) GetPublishers() []string

func (*ApiProduct) GetRequiresGames added in v0.2.6

func (ap *ApiProduct) GetRequiresGames() []string

func (*ApiProduct) GetScreenshots added in v0.2.6

func (ap *ApiProduct) GetScreenshots() []string

func (*ApiProduct) GetSeries added in v0.2.6

func (ap *ApiProduct) GetSeries() string

func (*ApiProduct) GetStoreTags added in v0.2.6

func (ap *ApiProduct) GetStoreTags() []string

GetStoreTags returns values displayed in Store as "Tags". ApiProduct has store tags in Properties

func (*ApiProduct) GetStoreUrl added in v0.2.6

func (ap *ApiProduct) GetStoreUrl() string

func (*ApiProduct) GetSupportUrl added in v0.2.6

func (ap *ApiProduct) GetSupportUrl() string

func (*ApiProduct) GetTitle added in v0.2.6

func (ap *ApiProduct) GetTitle() string

func (*ApiProduct) GetVerticalImage added in v0.2.6

func (ap *ApiProduct) GetVerticalImage() string

func (*ApiProduct) GetVideoIds added in v0.2.6

func (ap *ApiProduct) GetVideoIds() []string

type CatalogFilters

type CatalogFilters struct {
	ReleaseDateRange struct {
		Min int `json:"min"`
		Max int `json:"max"`
	} `json:"releaseDateRange"`
	PriceRange struct {
		Min           float64 `json:"min"`
		Max           float64 `json:"max"`
		Currency      string  `json:"currency"`
		DecimalPlaces int     `json:"decimalPlaces"`
	} `json:"priceRange"`
	Genres          []NameSlug `json:"genres"`
	Languages       []NameSlug `json:"languages"`
	Systems         []NameSlug `json:"systems"`
	Tags            []NameSlug `json:"tags"`
	Discounted      bool       `json:"discounted"`
	Features        []NameSlug `json:"features"`
	ReleaseStatuses []NameSlug `json:"releaseStatuses"`
	Types           []string   `json:"types"`
	FullGenresList  []struct {
		NameSlug
		Level int `json:"level"`
	} `json:"fullGenresList"`
	FullTagsList []NameSlug `json:"fullTagsList"`
}

type CatalogPage

type CatalogPage struct {
	Pages                      int              `json:"pages"`
	CurrentlyShownProductCount int              `json:"currentlyShownProductCount"`
	ProductCount               int              `json:"productCount"`
	Products                   []CatalogProduct `json:"products"`
	Filters                    CatalogFilters   `json:"filters"`
}

type CatalogPrice

type CatalogPrice struct {
	Final      string         `json:"final"`
	Base       string         `json:"base"`
	Discount   *string        `json:"discount"`
	FinalMoney AmountCurrency `json:"finalMoney"`
	BaseMoney  AmountCurrency `json:"baseMoney"`
}

type CatalogProduct

type CatalogProduct struct {
	Id                    string                 `json:"id"`
	Title                 string                 `json:"title"`
	Slug                  string                 `json:"slug"`
	Developers            []string               `json:"developers"`
	Publishers            []string               `json:"publishers"`
	Features              []NameSlug             `json:"features"`
	Editions              []Edition              `json:"editions"`
	Genres                []NameSlug             `json:"genres"`
	ProductType           string                 `json:"productType"`
	ReleaseDate           *string                `json:"releaseDate"`
	ReviewsRating         int                    `json:"reviewsRating"`
	OperatingSystems      []string               `json:"operatingSystems"`
	CoverHorizontal       string                 `json:"coverHorizontal"`
	CoverVertical         string                 `json:"coverVertical"`
	Screenshots           []string               `json:"screenshots"`
	ProductState          string                 `json:"productState"`
	Tags                  []NameSlug             `json:"tags"`
	UserPreferredLanguage *UserPreferredLanguage `json:"userPreferredLanguage"`
	Price                 CatalogPrice           `json:"price"`
	StoreLink             string                 `json:"storeLink"`
}

func (*CatalogProduct) GetBasePrice

func (cp *CatalogProduct) GetBasePrice() string

func (*CatalogProduct) GetComingSoon

func (cp *CatalogProduct) GetComingSoon() bool

func (*CatalogProduct) GetDevelopers

func (cp *CatalogProduct) GetDevelopers() []string

func (*CatalogProduct) GetDiscountPercentage

func (cp *CatalogProduct) GetDiscountPercentage() int

func (*CatalogProduct) GetEditions added in v0.2.11

func (cp *CatalogProduct) GetEditions() []string

func (*CatalogProduct) GetFeatures

func (cp *CatalogProduct) GetFeatures() []string

func (*CatalogProduct) GetGenres

func (cp *CatalogProduct) GetGenres() []string

func (*CatalogProduct) GetGlobalRelease

func (cp *CatalogProduct) GetGlobalRelease() string

func (*CatalogProduct) GetImage

func (cp *CatalogProduct) GetImage() string

func (*CatalogProduct) GetInDevelopment

func (cp *CatalogProduct) GetInDevelopment() bool

func (*CatalogProduct) GetOperatingSystems

func (cp *CatalogProduct) GetOperatingSystems() []string

func (*CatalogProduct) GetPreOrder

func (cp *CatalogProduct) GetPreOrder() bool

func (*CatalogProduct) GetPrice

func (cp *CatalogProduct) GetPrice() string

func (*CatalogProduct) GetProductType

func (cp *CatalogProduct) GetProductType() string

func (*CatalogProduct) GetPublishers

func (cp *CatalogProduct) GetPublishers() []string

func (*CatalogProduct) GetRating

func (cp *CatalogProduct) GetRating() string

func (*CatalogProduct) GetRootEditions added in v0.3.61

func (cp *CatalogProduct) GetRootEditions() []string

func (*CatalogProduct) GetScreenshots

func (cp *CatalogProduct) GetScreenshots() []string

func (*CatalogProduct) GetSlug

func (cp *CatalogProduct) GetSlug() string
func (cp *CatalogProduct) GetStoreLink() string

func (*CatalogProduct) GetStoreTags

func (cp *CatalogProduct) GetStoreTags() []string

func (*CatalogProduct) GetTitle

func (cp *CatalogProduct) GetTitle() string

func (*CatalogProduct) GetVerticalImage

func (cp *CatalogProduct) GetVerticalImage() string

func (*CatalogProduct) IsDiscounted

func (cp *CatalogProduct) IsDiscounted() bool

func (*CatalogProduct) IsFree

func (cp *CatalogProduct) IsFree() bool

type CatalogSortOrder

type CatalogSortOrder string
const (
	CatalogSortByTitle             CatalogSortOrder = "title"
	CatalogSortByDiscount          CatalogSortOrder = "discount"
	CatalogSortByReleaseDate       CatalogSortOrder = "storeReleaseDate"
	CatalogSortByRating            CatalogSortOrder = "reviewsRating"
	CatalogSortByPrice             CatalogSortOrder = "price"
	CatalogSortByBestselling       CatalogSortOrder = "bestselling"
	CatalogSortByExternalProductId CatalogSortOrder = "externalProductId"
)

type CreateTagResp

type CreateTagResp struct {
	Id string `json:"id"`
}

type DefaultEnglish added in v0.1.69

type DefaultEnglish struct {
	Default string `json:"*"`
	EnUS    string `json:"en-US"`
}

type DeleteTagResp

type DeleteTagResp struct {
	Status string `json:"status"`
}

type Details

type Details struct {
	Title           string `json:"title"`
	BackgroundImage string `json:"backgroundImage"`
	CdKey           string `json:"cdKey"`
	TextInformation string `json:"textInformation"`
	//GetDownloads comment explains why this is [][]interface{}
	Downloads              []interface{}    `json:"downloads"`
	GalaxyDownloads        []interface{}    `json:"galaxyDownloads"`
	Extras                 []ManualDownload `json:"extras"`
	DLCs                   []Details        `json:"dlcs"`
	Tags                   []accountTag     `json:"tags"`
	IsPreOrder             bool             `json:"isPreOrder"`
	ReleaseTimestamp       int64            `json:"releaseTimestamp"`
	Messages               []string         `json:"messages"`
	Changelog              string           `json:"changelog"`
	ForumLink              string           `json:"forumLink"`
	IsBaseProductMissing   bool             `json:"isBaseProductMissing"`
	MissingBaseProduct     interface{}      `json:"missingBaseProduct"`
	Features               []string         `json:"features"`
	SimpleGalaxyInstallers []struct {
		Path string `json:"path"`
		Os   string `json:"os"`
	} `json:"simpleGalaxyInstallers"`
}

func (*Details) GetChangelog

func (det *Details) GetChangelog() string

func (*Details) GetFeatures

func (det *Details) GetFeatures() []string

func (*Details) GetForumUrl

func (det *Details) GetForumUrl() string

func (*Details) GetGOGRelease

func (det *Details) GetGOGRelease() string

func (*Details) GetGameDownloads

func (det *Details) GetGameDownloads() ([]LangOSManualDownloads, error)

GetGameDownloads extracts downloads for languages and operating systems from GOG.com details. Currently, this data is stored as array of arrays, where the inner array holds the language as the first element and the object containing Windows, Mac, Linux downloads as the second element. To process that we go through the array, save the language of the current element, then encode/decode the next elements using a LangOSDownloads struct.

func (*Details) GetOperatingSystems added in v0.3.10

func (det *Details) GetOperatingSystems() ([]string, error)

func (*Details) GetTagIds

func (det *Details) GetTagIds() []string

func (*Details) GetTagNames

func (det *Details) GetTagNames(tagIds []string) map[string]string

func (*Details) GetTitle

func (det *Details) GetTitle() string

type Edition added in v0.2.11

type Edition struct {
	Id            int    `json:"id"`
	Name          string `json:"name"`
	IsRootEdition bool   `json:"isRootEdition"`
}

type GamesDbProduct added in v0.1.69

type GamesDbProduct struct {
	Id                        string       `json:"id"`
	GameId                    string       `json:"game_id"`
	PlatformId                string       `json:"platform_id"`
	ExternalId                string       `json:"external_id"`
	DLCsIds                   []string     `json:"dlcs_ids"`
	DLCs                      []PlatformId `json:"dlcs"`
	ParentId                  interface{}  `json:"parent_id"`
	SupportedOperatingSystems []struct {
		Name string `json:"name"`
		Slug string `json:"slug"`
	} `json:"supported_operating_systems"`
	AvailableLanguages []struct {
		Code string `json:"code"`
	} `json:"available_languages"`
	FirstReleaseDate string `json:"first_release_date"`
	Game             struct {
		Id       string      `json:"id"`
		ParentId interface{} `json:"parent_id"`
		// GOG.com source data has inconsistent types:
		// 1199956349 is "dlcs_ids": [],
		// 1207666353 is "dlcs_ids": {
		//            "0": "51141465398619058",
		//            "1": "51141465407337843",
		//            "4": "51721481110251475"
		//        },
		DLCsIds                 any                   `json:"dlcs_ids"`
		FirstReleaseDate        string                `json:"first_release_date"`
		Releases                []PlatformId          `json:"releases"`
		Title                   DefaultEnglish        `json:"title"`
		SortingTitle            DefaultEnglish        `json:"sorting_title"`
		Type                    string                `json:"type"`
		DevelopersIds           []string              `json:"developers_ids"`
		Developers              []IdNameStringSlug    `json:"developers"`
		PublishersIds           []string              `json:"publishers_ids"`
		Publishers              []IdNameStringSlug    `json:"publishers"`
		GenresIds               []string              `json:"genres_ids"`
		Genres                  []IdNameLocalizedSlug `json:"genres"`
		ThemesIds               []string              `json:"themes_ids"`
		Themes                  []IdNameLocalizedSlug `json:"themes"`
		Screenshots             []UrlFormat           `json:"screenshots"`
		Videos                  []Video               `json:"videos"`
		Artworks                []UrlFormat           `json:"artworks"`
		Summary                 DefaultEnglish        `json:"summary"`
		VisibleInLibrary        bool                  `json:"visible_in_library"`
		AggregatedRating        float64               `json:"aggregated_rating"`
		GameModes               []IdNameStringSlug    `json:"game_modes"`
		HorizontalArtwork       UrlFormat             `json:"horizontal_artwork"`
		Background              UrlFormat             `json:"background"`
		VerticalCover           UrlFormat             `json:"vertical_cover"`
		Cover                   UrlFormat             `json:"cover"`
		Logo                    UrlFormat             `json:"logo"`
		Icon                    UrlFormat             `json:"icon"`
		SquareIcon              UrlFormat             `json:"square_icon"`
		GlobalPopularityAllTime int                   `json:"global_popularity_all_time"`
		GlobalPopularityCurrent int                   `json:"global_popularity_current"`
		Slug                    string                `json:"slug"`
	} `json:"game"`
	Title        DefaultEnglish     `json:"title"`
	SortingTitle DefaultEnglish     `json:"sorting_title"`
	Type         string             `json:"type"`
	Summary      DefaultEnglish     `json:"summary"`
	Videos       []Video            `json:"videos"`
	GameModes    []IdNameStringSlug `json:"game_modes"`
	Icon         UrlFormat          `json:"icon"`
}

func (*GamesDbProduct) GetAggregatedRating added in v0.1.71

func (gdp *GamesDbProduct) GetAggregatedRating() float64

func (*GamesDbProduct) GetGameModes added in v0.1.71

func (gdp *GamesDbProduct) GetGameModes() []string

func (*GamesDbProduct) GetSteamAppIds added in v0.1.84

func (gdp *GamesDbProduct) GetSteamAppIds() []uint32

func (*GamesDbProduct) GetThemes added in v0.1.71

func (gdp *GamesDbProduct) GetThemes() []string

func (*GamesDbProduct) GetVideoIds added in v0.1.70

func (gdp *GamesDbProduct) GetVideoIds() []string

type GogGameInfo added in v0.2.33

type GogGameInfo struct {
	BuildId    string     `json:"buildId"`
	ClientId   string     `json:"clientId"`
	GameId     string     `json:"gameId"`
	Language   string     `json:"language"`
	Languages  []string   `json:"languages"`
	Name       string     `json:"name"`
	OsBitness  []string   `json:"osBitness"`
	PlayTasks  []PlayTask `json:"playTasks"`
	RootGameId string     `json:"rootGameId"`
	Version    int        `json:"version"`
}

func GetGogGameInfo added in v0.2.84

func GetGogGameInfo(path string) (*GogGameInfo, error)

func (*GogGameInfo) GetPlayTask added in v0.2.87

func (ggi *GogGameInfo) GetPlayTask(playTask string) (*PlayTask, error)

type IdNameLocalizedSlug added in v0.1.69

type IdNameLocalizedSlug struct {
	Id   string         `json:"id"`
	Name DefaultEnglish `json:"name"`
	Slug string         `json:"slug"`
}

type IdNameStringSlug added in v0.1.69

type IdNameStringSlug struct {
	Id   string `json:"id"`
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type LangOSManualDownloads

type LangOSManualDownloads struct {
	Language string
	Windows  []ManualDownload `json:"windows"`
	Mac      []ManualDownload `json:"mac"`
	Linux    []ManualDownload `json:"linux"`
}

type Licence

type Licence string

type Licences

type Licences []Licence

type ManualDownload

type ManualDownload struct {
	ManualUrl string `json:"manualUrl"`
	Name      string `json:"name"`
	Version   string `json:"version"`
	Date      string `json:"date"`
	Type      string `json:"type"`
	Info      int    `json:"info"`
	Size      string `json:"size"`
}

type NameSlug

type NameSlug struct {
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type Order

type Order struct {
	PublicId string `json:"publicId"`
	//Distributor        interface{} `json:"distributor"`
	Date               int64  `json:"date"`
	MoneybackGuarantee bool   `json:"moneybackGuarantee"`
	Status             string `json:"status"`
	PaymentMethod      string `json:"paymentMethod"`
	//ValidUntil      interface{} `json:"validUntil"`
	CheckoutLink    string `json:"checkoutLink"`
	ReceiptLink     string `json:"receiptLink"`
	Total           value  `json:"total"`
	StoreCreditUsed value  `json:"storeCreditUsed"`
	//GiftRecipient interface{} `json:"giftRecipient"`
	//GiftSender interface{} `json:"giftSender"`
	Products      []OrderProduct `json:"products"`
	GiftCode      interface{}    `json:"giftCode"`
	IsResendable  bool           `json:"isResendable"`
	StatusPageUrl string         `json:"statusPageUrl"`
}

type OrderPage

type OrderPage struct {
	TotalPages int     `json:"totalPages"`
	Orders     []Order `json:"orders"`
}

type OrderProduct added in v0.3.38

type OrderProduct struct {
	//Status interface{} `json:"status"`
	//RelatedAccount interface{} `json:"relatedAccount"`
	Price struct {
		BaseAmount   string `json:"baseAmount"`
		Amount       string `json:"amount"`
		IsFree       bool   `json:"isFree"`
		IsDiscounted bool   `json:"isDiscounted"`
		Symbol       string `json:"symbol"`
	} `json:"price"`
	Image                      string `json:"image"`
	Title                      string `json:"title"`
	Id                         string `json:"id"`
	IsRefunded                 bool   `json:"isRefunded"`
	CashValue                  value  `json:"cashValue"`
	WalletValue                value  `json:"walletValue"`
	IsPreorder                 bool   `json:"isPreorder"`
	DisplayAutomaticRefundLink bool   `json:"displayAutomaticRefundLink"`
}

func (*OrderProduct) GetImage added in v0.3.38

func (op *OrderProduct) GetImage() string

type PlatformId added in v0.1.69

type PlatformId struct {
	Id                   string `json:"id"`
	PlatformId           string `json:"platform_id"`
	ExternalId           string `json:"external_id"`
	ReleasePerPlatformId string `json:"release_per_platform_id"`
}

type PlayTask added in v0.2.33

type PlayTask struct {
	Arguments  string   `json:"arguments,omitempty"`
	Category   string   `json:"category"`
	IsPrimary  bool     `json:"isPrimary,omitempty"`
	IsHidden   bool     `json:"isHidden,omitempty"`
	Languages  []string `json:"languages"`
	Link       string   `json:"link,omitempty"`
	Name       string   `json:"name"`
	OsBitness  []string `json:"osBitness"`
	Path       string   `json:"path,omitempty"`
	Type       string   `json:"type"`
	WorkingDir string   `json:"workingDir,omitempty"`
}

type TotalPagesProxy

type TotalPagesProxy struct {
	Pages      int              `json:"pages"`
	TotalPages int              `json:"totalPages"`
	Pagination *TotalPagesProxy `json:"pagination"`
}

TotalPagesProxy allow unmarshalling account, orders, store, wishlist pages (.TotalPages) and catalog pages (.Pages) structs to query total pages with GetTotalPages method

func (*TotalPagesProxy) GetTotalPages

func (tpp *TotalPagesProxy) GetTotalPages() int

type UrlFormat added in v0.1.69

type UrlFormat struct {
	UrlFormat string `json:"url_format"`
}

type UserAccessToken added in v0.1.98

type UserAccessToken struct {
	AccessToken string `json:"accessToken"`
	Expiration  int    `json:"accessTokenExpiration"`
	ClientId    string `json:"accessTokenClientId"`
	UserId      string `json:"accessTokenUserId"`
}

type UserData

type UserData struct {
	IsLoggedIn bool `json:"isLoggedIn"`
}

type UserPreferredLanguage

type UserPreferredLanguage struct {
	Code    string `json:"code"`
	InAudio bool   `json:"inAudio"`
	InText  bool   `json:"inText"`
}

type UserWishlist

type UserWishlist struct {
	Wishlist any    `json:"wishlist"`
	Checksum string `json:"checksum"`
}

type Video added in v0.1.69

type Video struct {
	Provider    string `json:"provider"`
	VideoId     string `json:"video_id"`
	ThumbnailId string `json:"thumbnail_id"`
	Name        string `json:"name"`
}

Jump to

Keyboard shortcuts

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