Documentation ¶
Index ¶
- Constants
- func AccountPageUrl(page string, mt Media, sortOrder AccountSortOrder, updated bool, hidden bool) *url.URL
- func AddTagUrl(productId, tagId string) *url.URL
- func AddToWishlistUrl(id string) *url.URL
- func ApiProductV1Url(id string, mt Media) *url.URL
- func ApiProductV2Url(id string, mt Media) *url.URL
- func AuthHostUrl() *url.URL
- func CreateTagUrl(name string) *url.URL
- func DefaultAccountPageUrl(page string, mt Media) *url.URL
- func DefaultLicencesUrl(id string, mt Media) *url.URL
- func DefaultOrdersPageUrl(page string, mt Media) *url.URL
- func DefaultStorePageUrl(page string, mt Media) *url.URL
- func DefaultWishlistPageUrl(page string, mt Media) *url.URL
- func DeleteTagUrl(tagId string) *url.URL
- func DetailsUrl(id string, mt Media) *url.URL
- func ImageId(imageUrl string) string
- func ImageUrl(imageId, ext string) (*url.URL, error)
- func LicencesUrl() *url.URL
- func LoggedIn(client *http.Client) (bool, error)
- func Login(client *http.Client, username, password string, ...) error
- func LoginCheckUrl() *url.URL
- func LoginHostUrl() *url.URL
- func LoginTwoStepUrl() *url.URL
- func ManualDownloadUrl(manualDownload string) *url.URL
- func OnLoginSuccessUrl() *url.URL
- func OrdersPageUrl(page string, ...) *url.URL
- func ReCaptchaUrl() *url.URL
- func RemoveFromWishlistUrl(id string) *url.URL
- func RemoveTagUrl(productId, tagId string) *url.URL
- func ScreenshotsJpgUrls(screenshots []string) ([]*url.URL, error)
- func StorePageUrl(page string, mt Media, sortOrder StoreSortOrder) *url.URL
- func UpdateTagsUrl(tagsJson string) *url.URL
- func UserDataUrl() *url.URL
- func ValidMedia(mt Media) bool
- func WishlistPageUrl(page string, mt Media, sortOrder WishlistSortOrder, hidden bool) *url.URL
- type AccountPage
- type AccountProduct
- func (ap *AccountProduct) GetId() int
- func (ap *AccountProduct) GetImage() string
- func (ap *AccountProduct) GetOperatingSystems() []string
- func (ap *AccountProduct) GetRating() string
- func (ap *AccountProduct) GetSlug() string
- func (ap *AccountProduct) GetTagIds() []string
- func (ap *AccountProduct) GetTitle() string
- type AccountSortOrder
- type AddRemoveTagResp
- type ApiProductV1
- func (apv1 *ApiProductV1) GetBackground() string
- func (apv1 *ApiProductV1) GetGOGRelease() int64
- func (apv1 *ApiProductV1) GetIcon() string
- func (apv1 *ApiProductV1) GetId() int
- func (apv1 *ApiProductV1) GetNativeLanguages() map[string]string
- func (apv1 *ApiProductV1) GetOperatingSystems() []string
- func (apv1 *ApiProductV1) GetScreenshots() []string
- func (apv1 *ApiProductV1) GetSlug() string
- func (apv1 *ApiProductV1) GetTitle() string
- func (apv1 *ApiProductV1) GetVideoIds() []string
- type ApiProductV2
- func (apv2 *ApiProductV2) GetBackground() string
- func (apv2 *ApiProductV2) GetBoxArt() string
- func (apv2 *ApiProductV2) GetDevelopers() []string
- func (apv2 *ApiProductV2) GetFeatures() []string
- func (apv2 *ApiProductV2) GetGOGRelease() int64
- func (apv2 *ApiProductV2) GetGalaxyBackground() string
- func (apv2 *ApiProductV2) GetGenres() []string
- func (apv2 *ApiProductV2) GetGlobalRelease() int64
- func (apv2 *ApiProductV2) GetIcon() string
- func (apv2 *ApiProductV2) GetId() int
- func (apv2 *ApiProductV2) GetImage() string
- func (apv2 *ApiProductV2) GetIncludesGames() []string
- func (apv2 *ApiProductV2) GetIsIncludedInGames() []string
- func (apv2 *ApiProductV2) GetIsRequiredByGames() []string
- func (apv2 *ApiProductV2) GetLanguageCodes() []string
- func (apv2 *ApiProductV2) GetLanguages() map[string]string
- func (apv2 *ApiProductV2) GetLogo() string
- func (apv2 *ApiProductV2) GetOperatingSystems() []string
- func (apv2 *ApiProductV2) GetPublisher() string
- func (apv2 *ApiProductV2) GetRequiresGames() []string
- func (apv2 *ApiProductV2) GetScreenshots() []string
- func (apv2 *ApiProductV2) GetSeries() string
- func (apv2 *ApiProductV2) GetTitle() string
- func (apv2 *ApiProductV2) GetVideoIds() []string
- type BackgroundGetter
- type BoxArtGetter
- type CreateTagResp
- type DeleteTagResp
- type Details
- func (det *Details) GetBackground() string
- func (det *Details) GetFeatures() []string
- func (det *Details) GetGOGRelease() int64
- func (det *Details) GetGameDownloads() ([]LangOSManualDownloads, error)
- func (det *Details) GetMovieDownloads() ([]ManualDownload, error)
- func (det *Details) GetTagIds() []string
- func (det *Details) GetTagNames(tagIds []string) map[string]string
- func (det *Details) GetTitle() string
- type DevelopersGetter
- type FeaturesGetter
- type GOGReleaseGetter
- type GalaxyBackgroundGetter
- type GenresGetter
- type GlobalReleaseGetter
- type IconGetter
- type IdGetter
- type ImageGetter
- type IncludesGamesGetter
- type IsIncludedInGamesGetter
- type IsRequiredByGamesGetter
- type LangOSManualDownloads
- type LanguageCodesGetter
- type LanguagesGetter
- type Licence
- type Licences
- type LogoGetter
- type ManualDownload
- type Media
- type NativeLanguagesGetter
- type OperatingSystemsGetter
- type Order
- type OrderPage
- type Page
- type ProductsGetter
- type PublisherGetter
- type RatingGetter
- type RequiresGamesGetter
- type ScreenshotsGetter
- type SeriesGetter
- type SlugGetter
- type StorePage
- type StoreProduct
- func (sp *StoreProduct) GetDevelopers() []string
- func (sp *StoreProduct) GetGOGRelease() int64
- func (sp *StoreProduct) GetGenres() []string
- func (sp *StoreProduct) GetGlobalRelease() int64
- func (sp *StoreProduct) GetId() int
- func (sp *StoreProduct) GetImage() string
- func (sp *StoreProduct) GetOperatingSystems() []string
- func (sp *StoreProduct) GetPublisher() string
- func (sp *StoreProduct) GetRating() string
- func (sp *StoreProduct) GetScreenshots() []string
- func (sp *StoreProduct) GetSlug() string
- func (sp *StoreProduct) GetTitle() string
- func (sp *StoreProduct) GetVideoIds() []string
- type StoreSortOrder
- type TagIdsGetter
- type TagNamesGetter
- type TitleGetter
- type TotalPages
- type UserData
- type VideoIdsGetter
- type WishlistPage
- type WishlistSortOrder
Constants ¶
const ( AccountSortByTitle AccountSortOrder = "title" AccountSortByPurchaseDate = "date_purchased" AccountSortByTags = "tags" AccountSortByOldestFirst = "release_date_asc" AccountSortByNewestFirst = "release_date_asc" )
const ( PngExt = ".png" JpgExt = ".jpg" )
const ( StoreSortByBestselling StoreSortOrder = "popularity" StoreSortByAlphabetically = "title" StoreSortByUserRating = "rating" StoreSortByDateAdded = "date" StoreSortByBestsellingAllTime = "bestselling" StoreSortByOldestFirst = "release_asc" StoreSortByNewestFirst = "release_desc" )
const ( GogHost = "gog.com" WwwGogHost = "www." + GogHost )
hosts
const ( WishlistSortByTitle WishlistSortOrder = "title" WishlistSortByDateAdded = "date_added" WishlistSortByUserReviews = "user_reviews" )
const (
HttpsScheme = "https"
)
Variables ¶
This section is empty.
Functions ¶
func AccountPageUrl ¶
func AddToWishlistUrl ¶
func AuthHostUrl ¶
func CreateTagUrl ¶
func DeleteTagUrl ¶
func LicencesUrl ¶
func Login ¶
Login to GOG.com for account formData queries using username and password
Overall flow is: - Get auth token from the page (this would check for reCaptcha as well) - Post username, password and token for check - Check for presence of second step auth token - (Optional) Post 4 digit second step auth code
func LoginCheckUrl ¶
func LoginHostUrl ¶
func LoginTwoStepUrl ¶
func ManualDownloadUrl ¶
func OnLoginSuccessUrl ¶
func OrdersPageUrl ¶
func ReCaptchaUrl ¶
func RemoveFromWishlistUrl ¶
func RemoveTagUrl ¶
func StorePageUrl ¶
func StorePageUrl( page string, mt Media, sortOrder StoreSortOrder) *url.URL
func UpdateTagsUrl ¶
func UserDataUrl ¶
func ValidMedia ¶
func WishlistPageUrl ¶
Types ¶
type AccountPage ¶
type AccountPage struct { Page SortBy string `json:"sortBy"` TotalProducts int `json:"totalProducts"` ProductsPerPage int `json:"productsPerPage"` // TODO: find data examples where ContentSystemCompatibility is not empty and create a type from that ContentSystemCompatibility interface{} `json:"contentSystemCompatibility"` 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) GetProducts ¶
func (app *AccountPage) GetProducts() []IdGetter
func (*AccountPage) GetTagIds ¶
func (app *AccountPage) GetTagIds() []string
func (*AccountPage) GetTagNames ¶
func (app *AccountPage) GetTagNames(tagIds []string) map[string]string
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) GetId ¶
func (ap *AccountProduct) GetId() int
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) 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 ApiProductV1 ¶
type ApiProductV1 struct { Id int `json:"id"` Title string `json:"title"` PurchaseLink string `json:"purchase_link"` Slug string `json:"slug"` ContentSystemCompatibility struct { Windows bool `json:"windows"` Osx bool `json:"osx"` Linux bool `json:"linux"` } `json:"content_system_compatibility"` //see comment on top of commented out implementation of GetDLCs() //that applies here as well - empty maps are passed as [] by GOG Languages interface{} `json:"languages"` Links struct { PurchaseLink string `json:"purchase_link"` ProductCard string `json:"product_card"` Support string `json:"support"` Forum string `json:"forum"` } `json:"links"` InDevelopment struct { Active bool `json:"active"` Until interface{} `json:"until"` } `json:"in_development"` IsSecret bool `json:"is_secret"` IsInstallable bool `json:"is_installable"` GameType string `json:"game_type"` IsPreOrder bool `json:"is_pre_order"` ReleaseDate string `json:"release_date"` Images images `json:"images"` //see comment on top of commented out implementation of GetDLCs() //that explains why DLCs is an interface and not a struct DLCs interface{} `json:"dlcs"` Downloads struct { Installers []downloadFiles `json:"installers"` Patches []downloadFiles `json:"patches"` LanguagePacks []downloadFiles `json:"language_packs"` BonusContent []bonusFiles `json:"bonus_content"` } `json:"downloads"` ExpandedDLCs []ApiProductV1 `json:"expanded_dlcs"` Description struct { Lead string `json:"lead"` Full string `json:"full"` WhatsCoolAboutIt string `json:"whats_cool_about_it"` } `json:"description"` Screenshots []struct { ImageId string `json:"image_id"` FormatterTemplateUrl string `json:"formatter_template_url"` FormattedImages []struct { FormatterName string `json:"formatter_name"` ImageUrl string `json:"image_url"` } `json:"formatted_images"` } `json:"screenshots"` Videos []struct { VideoUrl string `json:"video_url"` ThumbnailUrl string `json:"thumbnail_url"` Provider string `json:"provider"` } `json:"videos"` RelatedProducts []ApiProductV1 `json:"related_products"` Changelog string `json:"changelog"` }
func (*ApiProductV1) GetBackground ¶
func (apv1 *ApiProductV1) GetBackground() string
func (*ApiProductV1) GetGOGRelease ¶
func (apv1 *ApiProductV1) GetGOGRelease() int64
func (*ApiProductV1) GetIcon ¶
func (apv1 *ApiProductV1) GetIcon() string
func (*ApiProductV1) GetId ¶
func (apv1 *ApiProductV1) GetId() int
func (*ApiProductV1) GetNativeLanguages ¶
func (apv1 *ApiProductV1) GetNativeLanguages() map[string]string
func (*ApiProductV1) GetOperatingSystems ¶
func (apv1 *ApiProductV1) GetOperatingSystems() []string
func (*ApiProductV1) GetScreenshots ¶
func (apv1 *ApiProductV1) GetScreenshots() []string
func (*ApiProductV1) GetSlug ¶
func (apv1 *ApiProductV1) GetSlug() string
func (*ApiProductV1) GetTitle ¶
func (apv1 *ApiProductV1) GetTitle() string
func (*ApiProductV1) GetVideoIds ¶
func (apv1 *ApiProductV1) GetVideoIds() []string
type ApiProductV2 ¶
type ApiProductV2 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"` 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"` 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 (*ApiProductV2) GetBackground ¶
func (apv2 *ApiProductV2) GetBackground() string
func (*ApiProductV2) GetBoxArt ¶
func (apv2 *ApiProductV2) GetBoxArt() string
func (*ApiProductV2) GetDevelopers ¶
func (apv2 *ApiProductV2) GetDevelopers() []string
func (*ApiProductV2) GetFeatures ¶
func (apv2 *ApiProductV2) GetFeatures() []string
func (*ApiProductV2) GetGOGRelease ¶
func (apv2 *ApiProductV2) GetGOGRelease() int64
func (*ApiProductV2) GetGalaxyBackground ¶
func (apv2 *ApiProductV2) GetGalaxyBackground() string
func (*ApiProductV2) GetGenres ¶
func (apv2 *ApiProductV2) GetGenres() []string
func (*ApiProductV2) GetGlobalRelease ¶
func (apv2 *ApiProductV2) GetGlobalRelease() int64
func (*ApiProductV2) GetIcon ¶
func (apv2 *ApiProductV2) GetIcon() string
func (*ApiProductV2) GetId ¶
func (apv2 *ApiProductV2) GetId() int
func (*ApiProductV2) GetImage ¶
func (apv2 *ApiProductV2) GetImage() string
func (*ApiProductV2) GetIncludesGames ¶
func (apv2 *ApiProductV2) GetIncludesGames() []string
func (*ApiProductV2) GetIsIncludedInGames ¶
func (apv2 *ApiProductV2) GetIsIncludedInGames() []string
func (*ApiProductV2) GetIsRequiredByGames ¶
func (apv2 *ApiProductV2) GetIsRequiredByGames() []string
func (*ApiProductV2) GetLanguageCodes ¶
func (apv2 *ApiProductV2) GetLanguageCodes() []string
func (*ApiProductV2) GetLanguages ¶
func (apv2 *ApiProductV2) GetLanguages() map[string]string
func (*ApiProductV2) GetLogo ¶
func (apv2 *ApiProductV2) GetLogo() string
func (*ApiProductV2) GetOperatingSystems ¶
func (apv2 *ApiProductV2) GetOperatingSystems() []string
func (*ApiProductV2) GetPublisher ¶
func (apv2 *ApiProductV2) GetPublisher() string
func (*ApiProductV2) GetRequiresGames ¶
func (apv2 *ApiProductV2) GetRequiresGames() []string
func (*ApiProductV2) GetScreenshots ¶
func (apv2 *ApiProductV2) GetScreenshots() []string
func (*ApiProductV2) GetSeries ¶
func (apv2 *ApiProductV2) GetSeries() string
func (*ApiProductV2) GetTitle ¶
func (apv2 *ApiProductV2) GetTitle() string
func (*ApiProductV2) GetVideoIds ¶
func (apv2 *ApiProductV2) GetVideoIds() []string
type BackgroundGetter ¶
type BackgroundGetter interface {
GetBackground() string
}
type BoxArtGetter ¶
type BoxArtGetter interface {
GetBoxArt() string
}
type CreateTagResp ¶
type CreateTagResp struct {
Id string `json:"id"`
}
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 int `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) GetBackground ¶
func (*Details) GetFeatures ¶
func (*Details) GetGOGRelease ¶
func (*Details) GetGameDownloads ¶
func (det *Details) GetGameDownloads() ([]LangOSManualDownloads, error)
GetDownloads 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) GetMovieDownloads ¶
func (det *Details) GetMovieDownloads() ([]ManualDownload, error)
type DevelopersGetter ¶
type DevelopersGetter interface {
GetDevelopers() []string
}
type FeaturesGetter ¶
type FeaturesGetter interface {
GetFeatures() []string
}
type GOGReleaseGetter ¶
type GOGReleaseGetter interface {
GetGOGRelease() int64
}
type GalaxyBackgroundGetter ¶
type GalaxyBackgroundGetter interface {
GetGalaxyBackground() string
}
type GenresGetter ¶
type GenresGetter interface {
GetGenres() []string
}
type GlobalReleaseGetter ¶
type GlobalReleaseGetter interface {
GetGlobalRelease() int64
}
type IconGetter ¶
type IconGetter interface {
GetIcon() string
}
type ImageGetter ¶
type ImageGetter interface {
GetImage() string
}
type IncludesGamesGetter ¶
type IncludesGamesGetter interface {
GetIncludesGames() []string
}
type IsIncludedInGamesGetter ¶
type IsIncludedInGamesGetter interface {
GetIsIncludedInGames() []string
}
type IsRequiredByGamesGetter ¶
type IsRequiredByGamesGetter interface {
GetIsRequiredByGames() []string
}
type LangOSManualDownloads ¶
type LangOSManualDownloads struct { Language string Windows []ManualDownload `json:"windows"` Mac []ManualDownload `json:"mac"` Linux []ManualDownload `json:"linux"` }
type LanguageCodesGetter ¶
type LanguageCodesGetter interface {
GetLanguageCodes() []string
}
type LanguagesGetter ¶
type LogoGetter ¶
type LogoGetter interface {
GetLogo() string
}
type ManualDownload ¶
type NativeLanguagesGetter ¶
type OperatingSystemsGetter ¶
type OperatingSystemsGetter interface {
GetOperatingSystems() []string
}
type Order ¶
type Order struct { PublicId string `json:"publicId"` // TODO: find non-nil data to infer type Distributor interface{} `json:"distributor"` Date int `json:"date"` MoneybackGuarantee bool `json:"moneybackGuarantee"` Status string `json:"status"` PaymentMethod string `json:"paymentMethod"` // TODO: find non-nil data to infer type ValidUntil interface{} `json:"validUntil"` CheckoutLink string `json:"checkoutLink"` ReceiptLink string `json:"receiptLink"` Total value `json:"total"` StoreCreditUsed value `json:"storeCreditUsed"` // TODO: find non-nil data to infer type GiftRecipient interface{} `json:"giftRecipient"` // TODO: find non-nil data to infer type GiftSender interface{} `json:"giftSender"` Products []struct { // TODO: find non-nil data to infer type Status interface{} `json:"status"` // TODO: find non-nil data to infer type 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"` // TODO: find non-nil data to infer type RefundDate interface{} `json:"refundDate"` } `json:"products"` GiftCode interface{} `json:"giftCode"` IsResendable bool `json:"isResendable"` StatusPageUrl string `json:"statusPageUrl"` }
type OrderPage ¶
type OrderPage struct { TotalPages Orders []Order `json:"orders"` }
func (*OrderPage) GetProducts ¶
type Page ¶
type Page struct { TotalPages Page int `json:"page"` }
type ProductsGetter ¶
type ProductsGetter interface {
GetProducts() []IdGetter
}
type PublisherGetter ¶
type PublisherGetter interface {
GetPublisher() string
}
type RatingGetter ¶
type RatingGetter interface {
GetRating() string
}
type RequiresGamesGetter ¶
type RequiresGamesGetter interface {
GetRequiresGames() []string
}
type ScreenshotsGetter ¶
type ScreenshotsGetter interface {
GetScreenshots() []string
}
type SeriesGetter ¶
type SeriesGetter interface {
GetSeries() string
}
type SlugGetter ¶
type SlugGetter interface {
GetSlug() string
}
type StorePage ¶
type StorePage struct { Page Products []StoreProduct `json:"products"` // TODO: find data examples where Ts is not empty and create a type from that Ts interface{} `json:"ts"` TotalResults string `json:"totalResults"` TotalGamesFound int `json:"totalGamesFound"` TotalMoviesFound int `json:"totalMoviesFound"` }
func (*StorePage) GetProducts ¶
type StoreProduct ¶
type StoreProduct struct { CustomAttributes interface{} `json:"customAttributes"` Developer string `json:"developer"` Publisher string `json:"publisher"` Gallery []string `json:"gallery"` Video struct { Id string `json:"id"` Provider string `json:"provider"` } `json:"video"` SupportedOperatingSystems []string `json:"supportedOperatingSystems"` Genres []string `json:"genres"` GlobalReleaseDate int `json:"globalReleaseDate"` IsTBA bool `json:"isTBA"` Price struct { Amount string `json:"amount"` BaseAmount string `json:"baseAmount"` FinalAmount string `json:"finalAmount"` IsDiscounted bool `json:"isDiscounted"` DiscountPercentage int `json:"discountPercentage"` DiscountDifference string `json:"discountDifference"` Symbol string `json:"symbol"` IsFree bool `json:"isFree"` Discount int `json:"discount"` IsBonusStoreCreditIncluded bool `json:"isBonusStoreCreditIncluded"` BonusStoreCreditAmount string `json:"bonusStoreCreditAmount"` PromoId *string `json:"promoId"` } `json:"price"` IsDiscounted bool `json:"isDiscounted"` IsInDevelopment bool `json:"isInDevelopment"` Id int `json:"id"` ReleaseDate int `json:"releaseDate"` Availability struct { IsAvailable bool `json:"isAvailable"` IsAvailableInAccount bool `json:"isAvailableInAccount"` } `json:"availability"` SalesVisibility struct { IsActive bool `json:"isActive"` FromObject struct { Date string `json:"date"` TimezoneType int `json:"timezone_type"` Timezone string `json:"timezone"` } `json:"fromObject"` From int `json:"from"` ToObject struct { Date string `json:"date"` TimezoneType int `json:"timezone_type"` Timezone string `json:"timezone"` } `json:"toObject"` To int `json:"to"` } `json:"salesVisibility"` Buyable bool `json:"buyable"` Title string `json:"title"` Image string `json:"image"` Url string `json:"url"` SupportUrl string `json:"supportUrl"` ForumUrl string `json:"forumUrl"` WorksOn struct { Windows bool `json:"Windows"` Mac bool `json:"Mac"` Linux bool `json:"Linux"` } `json:"worksOn"` Category string `json:"category"` OriginalCategory string `json:"originalCategory"` Rating int `json:"rating"` Type int `json:"type"` IsComingSoon bool `json:"isComingSoon"` IsPriceVisible bool `json:"isPriceVisible"` IsMovie bool `json:"isMovie"` IsGame bool `json:"isGame"` Slug string `json:"slug"` IsWishlistable bool `json:"isWishlistable"` }
func (*StoreProduct) GetDevelopers ¶
func (sp *StoreProduct) GetDevelopers() []string
func (*StoreProduct) GetGOGRelease ¶
func (sp *StoreProduct) GetGOGRelease() int64
func (*StoreProduct) GetGenres ¶
func (sp *StoreProduct) GetGenres() []string
func (*StoreProduct) GetGlobalRelease ¶
func (sp *StoreProduct) GetGlobalRelease() int64
func (*StoreProduct) GetId ¶
func (sp *StoreProduct) GetId() int
func (*StoreProduct) GetImage ¶
func (sp *StoreProduct) GetImage() string
func (*StoreProduct) GetOperatingSystems ¶
func (sp *StoreProduct) GetOperatingSystems() []string
func (*StoreProduct) GetPublisher ¶
func (sp *StoreProduct) GetPublisher() string
func (*StoreProduct) GetRating ¶
func (sp *StoreProduct) GetRating() string
func (*StoreProduct) GetScreenshots ¶
func (sp *StoreProduct) GetScreenshots() []string
func (*StoreProduct) GetSlug ¶
func (sp *StoreProduct) GetSlug() string
func (*StoreProduct) GetTitle ¶
func (sp *StoreProduct) GetTitle() string
func (*StoreProduct) GetVideoIds ¶
func (sp *StoreProduct) GetVideoIds() []string
type StoreSortOrder ¶
type StoreSortOrder string
type TagIdsGetter ¶
type TagIdsGetter interface {
GetTagIds() []string
}
type TagNamesGetter ¶
type TitleGetter ¶
type TitleGetter interface {
GetTitle() string
}
type TotalPages ¶
type TotalPages struct {
TotalPages int `json:"totalPages"`
}
type UserData ¶
type UserData struct { // TODO: at the moment we're only using this for a single field, consider completing the type IsLoggedIn bool `json:"isLoggedIn"` }
type VideoIdsGetter ¶
type VideoIdsGetter interface {
GetVideoIds() []string
}
type WishlistPage ¶
type WishlistPage struct { Page SortBy string `json:"sortBy"` TotalProducts int `json:"totalProducts"` ProductsPerPage int `json:"productsPerPage"` // TODO: find data examples where ContentSystemCompatibility is not empty and create a type from that ContentSystemCompatibility interface{} `json:"contentSystemCompatibility"` Products []StoreProduct `json:"products"` }
func (*WishlistPage) GetProducts ¶
func (wp *WishlistPage) GetProducts() []IdGetter
type WishlistSortOrder ¶
type WishlistSortOrder string
Source Files ¶
- account_page.go
- account_product.go
- account_products_urls.go
- account_sort_order.go
- account_tags_getter.go
- api_product_v1.go
- api_product_v1_urls.go
- api_product_v2.go
- api_product_v2_urls.go
- auth_urls.go
- default_headers.go
- details.go
- details_urls.go
- image_urls.go
- interfaces.go
- licences.go
- licences_urls.go
- logged_in.go
- login.go
- login_check_urls.go
- login_data.go
- login_two_step_urls.go
- manual_download_urls.go
- media.go
- node_matches.go
- on_login_success_urls.go
- operating_systems.go
- order.go
- orders_page.go
- orders_page_urls.go
- page.go
- recaptcha_urls.go
- second_step_data.go
- store_page.go
- store_page_urls.go
- store_product.go
- store_sort_order.go
- tags.go
- tags_urls.go
- url_const.go
- user_data.go
- user_data_urls.go
- wishlist_page.go
- wishlist_sort_order.go
- wishlist_urls.go
- youtube_video_id.go