Documentation
¶
Index ¶
- Constants
- Variables
- func AccountPageUrl(page string) *url.URL
- func AddTagUrl(productId, tagId string) *url.URL
- func AddToWishlist(httpClient *http.Client, ids ...string) error
- func AddToWishlistUrl(id string) *url.URL
- func AllLanguageCodes() iter.Seq[string]
- func ApiProductUrl(id string) *url.URL
- func CatalogOrder(sortBy CatalogSortOrder, desc bool) string
- func CatalogPageUrl(searchAfter string) *url.URL
- func CreateTagUrl(name string) *url.URL
- func DefaultLicencesUrl(_ string) *url.URL
- func DefaultUrl() *url.URL
- func DefaultUserWishlistUrl(_ string) *url.URL
- func DeleteTagUrl(tagId string) *url.URL
- func DetailsUrl(id string) *url.URL
- func DreamlistPageUrl(page string) *url.URL
- func GamesDbGenericExternalReleaseUrl(id string) *url.URL
- func GamesDbGogExternalReleaseUrl(id string) *url.URL
- func ImageId(imageUrl string) string
- func ImageIds(imageUrls ...string) []string
- func ImageUrl(imageId, ext string) (*url.URL, error)
- func IsLoggedIn(client *http.Client) error
- func LanguageCodeByNativeName(name string) string
- func LanguageCodesCloValues() []string
- func LanguageNativeName(langCode string) string
- func LicencesUrl() *url.URL
- func ManualDownloadUrl(manualDownload string) *url.URL
- func OrdersPageUrl(page string) *url.URL
- func RemoveFromWishlist(httpClient *http.Client, ids ...string) error
- func RemoveFromWishlistUrl(id string) *url.URL
- func RemoveTagUrl(productId, tagId string) *url.URL
- func ScreenshotsJpgUrls(screenshots []string) ([]*url.URL, error)
- func UpdateTagsUrl(tagsJson string) *url.URL
- func UserAccessTokenUrl() *url.URL
- func UserDataUrl() *url.URL
- func UserWishlistUrl() *url.URL
- type AccountPage
- type AccountProduct
- func (ap *AccountProduct) GetGlobalRelease() string
- func (ap *AccountProduct) GetImage() string
- func (ap *AccountProduct) GetOperatingSystems() []string
- func (ap *AccountProduct) GetRating() string
- func (ap *AccountProduct) GetSlug() string
- func (ap *AccountProduct) GetStoreUrl() string
- func (ap *AccountProduct) GetTagIds() []string
- func (ap *AccountProduct) GetTitle() string
- type AccountSortOrder
- type AddRemoveTagResp
- type AmountCurrency
- type ApiProduct
- func (ap *ApiProduct) GetAdditionalRequirements() string
- func (ap *ApiProduct) GetBackground() string
- func (ap *ApiProduct) GetCopyrights() string
- func (ap *ApiProduct) GetDescriptionFeatures() string
- func (ap *ApiProduct) GetDescriptionOverview() string
- func (ap *ApiProduct) GetDevelopers() []string
- func (ap *ApiProduct) GetFeatures() []string
- func (ap *ApiProduct) GetForumUrl() string
- func (ap *ApiProduct) GetGOGRelease() string
- func (ap *ApiProduct) GetGenres() []string
- func (ap *ApiProduct) GetGlobalRelease() string
- func (ap *ApiProduct) GetHero() string
- func (ap *ApiProduct) GetIcon() string
- func (ap *ApiProduct) GetIconSquare() string
- func (ap *ApiProduct) GetId() int
- func (ap *ApiProduct) GetImage() string
- func (ap *ApiProduct) GetInDevelopment() bool
- func (ap *ApiProduct) GetIncludesGames() []string
- func (ap *ApiProduct) GetIsIncludedInGames() []string
- func (ap *ApiProduct) GetIsModifiedByGames() []string
- func (ap *ApiProduct) GetIsRequiredByGames() []string
- func (ap *ApiProduct) GetLanguageCodes() []string
- func (ap *ApiProduct) GetLogo() string
- func (ap *ApiProduct) GetModifiesGames() []string
- func (ap *ApiProduct) GetOperatingSystems() []string
- func (ap *ApiProduct) GetPreOrder() bool
- func (ap *ApiProduct) GetProductType() string
- func (ap *ApiProduct) GetPublishers() []string
- func (ap *ApiProduct) GetRequiresGames() []string
- func (ap *ApiProduct) GetScreenshots() []string
- func (ap *ApiProduct) GetSeries() string
- func (ap *ApiProduct) GetStoreTags() []string
- func (ap *ApiProduct) GetStoreUrl() string
- func (ap *ApiProduct) GetSupportUrl() string
- func (ap *ApiProduct) GetTitle() string
- func (ap *ApiProduct) GetVerticalImage() string
- func (ap *ApiProduct) GetVideoIds() []string
- type CatalogFilters
- type CatalogPage
- type CatalogPrice
- type CatalogProduct
- func (cp *CatalogProduct) GetBasePrice() string
- func (cp *CatalogProduct) GetComingSoon() bool
- func (cp *CatalogProduct) GetDevelopers() []string
- func (cp *CatalogProduct) GetDiscountPercentage() int
- func (cp *CatalogProduct) GetEditions() []string
- func (cp *CatalogProduct) GetFeatures() []string
- func (cp *CatalogProduct) GetGenres() []string
- func (cp *CatalogProduct) GetGlobalRelease() string
- func (cp *CatalogProduct) GetImage() string
- func (cp *CatalogProduct) GetInDevelopment() bool
- func (cp *CatalogProduct) GetOperatingSystems() []string
- func (cp *CatalogProduct) GetPreOrder() bool
- func (cp *CatalogProduct) GetPrice() string
- func (cp *CatalogProduct) GetProductType() string
- func (cp *CatalogProduct) GetPublishers() []string
- func (cp *CatalogProduct) GetRating() string
- func (cp *CatalogProduct) GetRootEditions() []string
- func (cp *CatalogProduct) GetScreenshots() []string
- func (cp *CatalogProduct) GetSlug() string
- func (cp *CatalogProduct) GetStoreLink() string
- func (cp *CatalogProduct) GetStoreTags() []string
- func (cp *CatalogProduct) GetTitle() string
- func (cp *CatalogProduct) GetVerticalImage() string
- func (cp *CatalogProduct) IsDiscounted() bool
- func (cp *CatalogProduct) IsFree() bool
- type CatalogSortOrder
- type CreateTagResp
- type DefaultEnglish
- type DeleteTagResp
- type Details
- func (det *Details) GetChangelog() string
- func (det *Details) GetFeatures() []string
- func (det *Details) GetForumUrl() string
- func (det *Details) GetGOGRelease() string
- func (det *Details) GetGameDownloads() ([]LangOSManualDownloads, error)
- func (det *Details) GetOperatingSystems() ([]string, error)
- func (det *Details) GetTagIds() []string
- func (det *Details) GetTagNames(tagIds []string) map[string]string
- func (det *Details) GetTitle() string
- type Edition
- type GamesDbProduct
- type GogGameInfo
- type IdNameLocalizedSlug
- type IdNameStringSlug
- type LangOSManualDownloads
- type Licence
- type Licences
- type ManualDownload
- type NameSlug
- type Order
- type OrderPage
- type OrderProduct
- type PlatformId
- type PlayTask
- type TotalPagesProxy
- type UrlFormat
- type UserAccessToken
- type UserData
- type UserPreferredLanguage
- type UserWishlist
- type Video
Constants ¶
const ( AccountSortByTitle AccountSortOrder = "title" AccountSortByPurchaseDate = "date_purchased" AccountSortByTags = "tags" AccountSortByOldestFirst = "release_date_asc" AccountSortByNewestFirst = "release_date_asc" )
const ( CatalogProductStateDefault = "default" CatalogProductStateComingSoon = "coming-soon" CatalogProductStateEarlyAccess = "early-access" CatalogProductStatePreOrder = "preorder" )
const ( Ascending = "asc" Descending = "desc" )
const ( PngExt = ".png" JpgExt = ".jpg" )
const ( OrderStatusGiftByMe = "gift_by_me" OrderStatusGiftForMe = "gift_for_me" OrderStatusPurchase = "purchase" OrderStatusRefund = "refund" )
const ( GogHost = "gog.com" WwwGogHost = "www." + GogHost )
hosts
const CatalogPagesProductsLimit = 100
const (
GogGameInfoFilenameTemplate = "goggame-{id}.info"
)
Variables ¶
var ErrNotLoggedIn = errors.New("user is not logged in, run import-cookies")
Functions ¶
func AccountPageUrl ¶
func AddToWishlistUrl ¶
func AllLanguageCodes ¶ added in v0.1.94
func ApiProductUrl ¶ added in v0.2.6
func CatalogOrder ¶
func CatalogOrder(sortBy CatalogSortOrder, desc bool) string
func CatalogPageUrl ¶
func CreateTagUrl ¶
func DefaultLicencesUrl ¶
func DefaultUrl ¶ added in v0.3.70
func DefaultUserWishlistUrl ¶
func DeleteTagUrl ¶
func DetailsUrl ¶
func DreamlistPageUrl ¶ added in v0.1.98
func GamesDbGenericExternalReleaseUrl ¶ added in v0.1.86
func GamesDbGogExternalReleaseUrl ¶ added in v0.1.86
func IsLoggedIn ¶ added in v0.1.94
func LanguageCodeByNativeName ¶ added in v0.1.94
func LanguageCodesCloValues ¶ added in v0.3.13
func LanguageCodesCloValues() []string
func LanguageNativeName ¶ added in v0.3.31
func LicencesUrl ¶
func ManualDownloadUrl ¶
func OrdersPageUrl ¶
func RemoveFromWishlistUrl ¶
func RemoveTagUrl ¶
func UpdateTagsUrl ¶
func UserAccessTokenUrl ¶ added in v0.1.98
func UserDataUrl ¶
func UserWishlistUrl ¶
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 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 (*ApiProduct) GetLogo ¶ added in v0.2.6
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 (*CatalogProduct) GetStoreLink ¶ added in v0.1.94
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 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 (*Details) GetFeatures ¶
func (*Details) GetForumUrl ¶
func (*Details) GetGOGRelease ¶
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
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"`
Logo UrlFormat `json:"logo"`
}
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 LangOSManualDownloads ¶
type LangOSManualDownloads struct {
Language string
Windows []ManualDownload `json:"windows"`
Mac []ManualDownload `json:"mac"`
Linux []ManualDownload `json:"linux"`
}
type ManualDownload ¶
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 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 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 UserAccessToken ¶ added in v0.1.98
type UserPreferredLanguage ¶
type UserWishlist ¶
Source Files
¶
- account_page.go
- account_page_url.go
- account_product.go
- account_sort_order.go
- account_tags_getter.go
- api_product.go
- api_product_url.go
- catalog_page.go
- catalog_page_url.go
- catalog_product.go
- catalog_sort_order.go
- default_headers.go
- details.go
- details_url.go
- dreamlist_page_url.go
- gamesdb.go
- gamesdb_url.go
- gog_game_info.go
- image_url.go
- interfaces.go
- languages.go
- licences.go
- licences_url.go
- logged_in.go
- manual_download_url.go
- operating_systems.go
- order.go
- order_product.go
- orders_page.go
- orders_page_url.go
- pagination.go
- second_step_data.go
- tags.go
- tags_url.go
- url_const.go
- user_access_token.go
- user_access_token_url.go
- user_data.go
- user_data_url.go
- user_wishlist.go
- user_wishlist_url.go
- wishlist_methods.go
- wishlist_url.go
- youtube_video_id.go