Documentation ¶
Index ¶
- Constants
- Variables
- func BatchApps(filter bson.D, projection bson.M, callback func(apps []App)) (err error)
- func BatchBundles(filter bson.D, projection bson.M, callback func(bundles []Bundle)) (err error)
- func BatchPackages(filter bson.D, projection bson.M, callback func(packages []Package)) (err error)
- func BatchStats(typex StatsType, callback func(stats []Stat)) (err error)
- func BulkUpdatePlayers(writes []mongo.WriteModel) (err error)
- func ChunkApps(strings []App, n int) (chunks [][]App)
- func Close()
- func CountDocuments(collection collection, filter bson.D, ttl uint32) (count int64, err error)
- func CountFriends(playerID int64) (count int64, err error)
- func DeleteAppDLC(appID int, DLCs []int) (err error)
- func DeleteAppItems(appID int, items []int) (err error)
- func DeleteFriends(playerID int64, friends []int64) (err error)
- func DeleteMany(collection collection, filter bson.D) (resp *mongo.DeleteResult, err error)
- func DeleteOne(collection collection, filter bson.D) (resp *mongo.DeleteResult, err error)
- func DeletePackageApps(packageID int, appIDs []int) (err error)
- func DeletePlayerGroups(playerID int64, groupIDs []string) (err error)
- func DeletePlayerWishlistApps(playerID int64, apps []int) (err error)
- func DeleteRecentApps(playerID int64, apps []int) (err error)
- func EnsureIndexes()
- func EnsureStat(typex StatsType, ids []int, names []string) (err error)
- func FindLatestPlayerAchievement(playerID int64, appID int) (int64, error)
- func FindOne(collection collection, filter bson.D, sort bson.D, projection bson.M, ...) (err error)
- func FindOrCreateStatsByName(typex StatsType, names []string) (IDs []int, err error)
- func GetDistict(collection collection, field string) (values []interface{}, err error)
- func GetGuildsByIDs(ids []string) (guildsMap map[string]DiscordGuild, err error)
- func GetHighestSaleOrder() (int, error)
- func GetRandomRows(collection collection, count int, filter bson.D, projection bson.M) (cur *mongo.Cursor, ctx context.Context, err error)
- func GetUniqueSaleTypes() (types []string, err error)
- func InsertMany(collection collection, documents []Document) (resp *mongo.InsertManyResult, err error)
- func InsertOne(collection collection, document Document) (resp *mongo.InsertOneResult, err error)
- func NewEvent(r *http.Request, userID int, eventType EventEnum) (err error)
- func ReplaceAppAchievements(achievements []AppAchievement) (err error)
- func ReplaceAppDLCs(DLCs []AppDLC) (err error)
- func ReplaceAppItems(items []AppItem) (err error)
- func ReplaceAppSameOwners(appID int, sameApps []AppSameOwners) (err error)
- func ReplaceArticles(articles []Article) (err error)
- func ReplaceOne(collection collection, filter bson.D, document Document) (resp *mongo.UpdateResult, err error)
- func ReplacePackageApps(apps []PackageApp) (err error)
- func ReplacePlayerAchievements(achievements []PlayerAchievement) (err error)
- func ReplacePlayerAliases(aliases []PlayerAlias) (err error)
- func ReplacePlayerBadges(badges []PlayerBadge) (err error)
- func ReplacePlayerFriends(friends []*PlayerFriend) (err error)
- func ReplacePlayerGroups(groups []PlayerGroup) (err error)
- func ReplacePlayerWishlistApps(apps []PlayerWishlistApp) (err error)
- func ReplaceRecentApps(apps []PlayerRecentApp) (err error)
- func ReplaceSales(offers []Sale) (err error)
- func SaveWebhook(service WebhookService, event string, body string) error
- func UpdateAppsInflux(writes []mongo.WriteModel) (err error)
- func UpdateBadgeSummary(id int) (err error)
- func UpdateManySet(collection collection, filter bson.D, update bson.D) (resp *mongo.UpdateResult, err error)
- func UpdateManyUnset(collection collection, columns bson.D) (resp *mongo.UpdateResult, err error)
- func UpdateOne(collection collection, filter bson.D, update bson.D) (resp *mongo.UpdateResult, err error)
- func UpdatePlayerApps(apps map[int]*PlayerApp) (err error)
- type App
- func GetApp(id int, full ...bool) (app App, err error)
- func GetApps(offset int64, limit int64, sort bson.D, filter bson.D, projection bson.M) (apps []App, err error)
- func GetAppsByID(ids []int, projection bson.M) (apps []App, err error)
- func PopularApps() (apps []App, err error)
- func PopularNewApps() (apps []App, err error)
- func TrendingApps() (apps []App, err error)
- func (app App) BSON() bson.D
- func (app App) GetAppRelatedApps() (apps []App, err error)
- func (app App) GetBackground() string
- func (app App) GetCategories() (stats []Stat, err error)
- func (app App) GetCommunityLink() string
- func (app App) GetCoopTags() (string, error)
- func (app App) GetDemos() (demos []App, err error)
- func (app App) GetDevelopers() (stats []Stat, err error)
- func (app App) GetDevelopersHTML() template.HTML
- func (app App) GetFollowers() string
- func (app App) GetGenres() (stats []Stat, err error)
- func (app App) GetGroupID() string
- func (app App) GetHeaderImage() string
- func (app App) GetID() int
- func (app App) GetIcon() string
- func (app App) GetInstallLink() template.URL
- func (app App) GetMetaImage() string
- func (app App) GetMicroTrailer() string
- func (app App) GetName() string
- func (app App) GetPICSUpdatedNice() string
- func (app App) GetPath() string
- func (app App) GetPathAbsolute() string
- func (app App) GetPeakTimeNice() string
- func (app App) GetPlatformImages() (ret template.HTML)
- func (app App) GetPlayLink() template.URL
- func (app App) GetPlayersInGame() (players int64, err error)
- func (app App) GetPlayersOnline() (players int64, err error)
- func (app App) GetPlayersPeakWeek() int
- func (app App) GetPlaytimeAverage() string
- func (app App) GetPrices() (prices helpers.ProductPrices)
- func (app App) GetProductType() helpers.ProductType
- func (app App) GetPublishers() (stats []Stat, err error)
- func (app App) GetPublishersHTML() template.HTML
- func (app App) GetReleaseDateNice() string
- func (app App) GetReviewScore() string
- func (app App) GetSteamPricesURL() string
- func (app App) GetStoreLink() string
- func (app App) GetSystemRequirements() (ret []helpers.SystemRequirement)
- func (app App) GetTags() (stats []Stat, err error)
- func (app App) GetTrend() string
- func (app App) GetType() string
- func (app App) GetTypeLower() (ret string)
- func (app App) GetUpdatedNice() string
- func (app App) HasSameOwners() bool
- func (app App) ReadPICS(m map[string]string) (config pics.PICSKeyValues)
- func (app App) ShouldUpdate() bool
- type AppAchievement
- type AppDLC
- type AppItem
- func (item AppItem) BSON() bson.D
- func (item AppItem) GetType() string
- func (item *AppItem) Image(size int, crop bool) string
- func (item *AppItem) Link() string
- func (item *AppItem) SetExchange(exchange string)
- func (item *AppItem) SetTags(tagsString string)
- func (item AppItem) ShortDescription() string
- type AppReleaseDateCount
- type AppReviewScoreCount
- type AppSameOwners
- type AppTagCount
- type AppTypeCount
- type Article
- type ArticleFeed
- type Bundle
- func (bundle Bundle) BSON() bson.D
- func (bundle Bundle) GetApps() int
- func (bundle Bundle) GetCreated() time.Time
- func (bundle Bundle) GetCreatedNice() string
- func (bundle Bundle) GetDiscount() int
- func (bundle Bundle) GetDiscountHighest() int
- func (bundle Bundle) GetDiscountSale() int
- func (bundle Bundle) GetID() int
- func (bundle Bundle) GetName() string
- func (bundle Bundle) GetPackages() int
- func (bundle Bundle) GetPath() string
- func (bundle Bundle) GetPrices() map[steamapi.ProductCC]int
- func (bundle Bundle) GetPricesFormatted() map[steamapi.ProductCC]string
- func (bundle Bundle) GetPricesSaleFormatted() map[steamapi.ProductCC]string
- func (bundle Bundle) GetScore() float64
- func (bundle Bundle) GetStoreLink() string
- func (bundle Bundle) GetType() string
- func (bundle Bundle) GetUpdated() time.Time
- func (bundle Bundle) GetUpdatedNice() string
- func (bundle Bundle) IsGiftable() bool
- func (bundle Bundle) OutputForJSON() (output []interface{})
- type BundlePrice
- type Change
- func (change Change) BSON() bson.D
- func (change Change) GetName() (name string)
- func (change Change) GetNiceDate() string
- func (change Change) GetPath() string
- func (change Change) GetTimestamp() int64
- func (change Change) OutputForJSON(allApps map[int]string, allPackages map[int]string) (output []interface{})
- type Count
- type DateCount
- type DiscordGuild
- type DiscordMessage
- type Document
- type Event
- type EventEnum
- type Group
- func (group Group) BSON() bson.D
- func (group Group) GetAbbr() string
- func (group Group) GetIcon() string
- func (group Group) GetIconAbsolute() string
- func (group Group) GetName() string
- func (group Group) GetPath() string
- func (group Group) GetTrend() string
- func (group Group) GetType() string
- func (group Group) GetURL() string
- func (group Group) IsOfficial() bool
- func (group Group) ShouldUpdate() bool
- type Package
- func (pack Package) BSON() bson.D
- func (pack Package) GetBillingType() string
- func (pack Package) GetBundles() (bundles []Bundle, err error)
- func (pack Package) GetComingSoon() string
- func (pack Package) GetID() int
- func (pack Package) GetIcon() string
- func (pack Package) GetLicenseType() string
- func (pack Package) GetMetaImage() string
- func (pack Package) GetName() (name string)
- func (pack Package) GetPICSUpdatedNice() string
- func (pack Package) GetPath() string
- func (pack Package) GetPlatformImages() (ret template.HTML)
- func (pack Package) GetPrices() (prices helpers.ProductPrices)
- func (pack Package) GetProductType() helpers.ProductType
- func (pack Package) GetStatus() string
- func (pack Package) GetType() string
- func (pack Package) GetUpdatedNice() string
- func (pack Package) HasEmptyIcon() bool
- func (pack Package) HasEmptyName() bool
- func (pack Package) OutputForJSON(code steamapi.ProductCC) (output []interface{})
- func (pack Package) Save() (err error)
- func (pack *Package) SetName(name string, force bool)
- func (pack Package) ShouldUpdate() bool
- func (pack Package) StoreLink() string
- type PackageApp
- type Player
- func (player Player) BSON() bson.D
- func (player Player) CommunityLink() string
- func (player Player) FriendsLink() string
- func (player Player) GetAchievements() int
- func (player Player) GetAvatar() string
- func (player Player) GetAvatar2() string
- func (player Player) GetAvatarAbsolute() string
- func (player Player) GetBadges() int
- func (player Player) GetBadgesFoil() int
- func (player Player) GetCountry() string
- func (player Player) GetFlag() string
- func (player Player) GetFriendLink() template.URL
- func (player Player) GetGameBans() int
- func (player Player) GetGamesCount() int
- func (player Player) GetLastBan() time.Time
- func (player Player) GetLevel() int
- func (player Player) GetMaxFriends() int
- func (player Player) GetMessageLink() template.URL
- func (player Player) GetName() string
- func (player Player) GetPath() string
- func (player Player) GetPathAbsolute() string
- func (player Player) GetPlaytime() int
- func (player Player) GetPlaytimePercent(platform string) (ret string)
- func (player Player) GetPlaytimeShort(platform string, max int) (ret string)
- func (player Player) GetRanks() map[helpers.RankMetric]int
- func (player Player) GetStateName() string
- func (player Player) GetSteamTimeNice() string
- func (player Player) GetSteamTimeUnix() int64
- func (player Player) GetUpdatedNice() string
- func (player Player) GetUpdatedUnix() int64
- func (player Player) GetVACBans() int
- func (player Player) GetWishlistTotal(cc steamapi.ProductCC) string
- func (player Player) GroupsLink() string
- func (player Player) NeedsUpdate(updateType UpdateType) bool
- func (player Player) WishlistLink() string
- type PlayerAchievement
- func GetPlayerAchievementsByPlayer(playerID int64, offset int64, sort bson.D) (achievements []PlayerAchievement, err error)
- func GetPlayerAchievementsByPlayerAndApp(playerID int64, appID int) (achievements []PlayerAchievement, err error)
- func GetPlayerAchievementsByPlayersAndApp(playerIDs []int64, appID int) (achievements []PlayerAchievement, err error)
- type PlayerAlias
- type PlayerApp
- func GetAppOwners(appID int) ([]PlayerApp, error)
- func GetAppPlayTimes(appID int) ([]PlayerApp, error)
- func GetPlayerAppByKey(playerID int64, appID int) (playerApp PlayerApp, err error)
- func GetPlayerApps(offset int64, limit int64, filter bson.D, sort bson.D) (apps []PlayerApp, err error)
- func GetPlayerAppsByApp(appID int, offset int64, filter bson.D) (apps []PlayerApp, err error)
- func GetPlayerAppsByPlayer(playerID int64, offset int64, limit int64, sort bson.D, projection bson.M, ...) (apps []PlayerApp, err error)
- func GetPlayerAppsByPlayers(playerIDs []int64, projection bson.M) (apps []PlayerApp, err error)
- func GetPlayerAppsByPlayersAndApp(playerIDs []int64, appID int) (apps []PlayerApp, err error)
- func (app PlayerApp) BSON() bson.D
- func (app PlayerApp) BSONUpdate() bson.D
- func (app PlayerApp) GetAchievementPercent() string
- func (app PlayerApp) GetHeaderImage() string
- func (app PlayerApp) GetIcon() string
- func (app PlayerApp) GetKey() string
- func (app PlayerApp) GetPath() string
- func (app PlayerApp) GetPriceFormatted(code steamapi.ProductCC) string
- func (app PlayerApp) GetPriceHourFormatted(code steamapi.ProductCC) string
- func (app PlayerApp) GetStoreLink() string
- func (app PlayerApp) GetTimeNice() string
- func (app PlayerApp) GetTimeNiceLong() string
- type PlayerAppStatsTemplate
- type PlayerAppsByCountry
- type PlayerBadge
- func (badge PlayerBadge) BSON() bson.D
- func (badge PlayerBadge) GetAppPath() string
- func (badge PlayerBadge) GetIcon() string
- func (badge PlayerBadge) GetKey() string
- func (badge PlayerBadge) GetName() string
- func (badge PlayerBadge) GetPath() string
- func (badge PlayerBadge) GetPathToggle() string
- func (badge PlayerBadge) GetPlayerCommunityLink() string
- func (badge PlayerBadge) GetPlayerIcon() string
- func (badge PlayerBadge) GetPlayerName() string
- func (badge PlayerBadge) GetPlayerPath() string
- func (badge PlayerBadge) GetType() string
- func (badge PlayerBadge) ID() int
- func (badge PlayerBadge) IsEvent() bool
- func (badge PlayerBadge) IsGame(appID int) bool
- func (badge PlayerBadge) IsSpecial() bool
- type PlayerBadgeSummary
- func (badge PlayerBadgeSummary) BSON() bson.D
- func (badge PlayerBadgeSummary) GetAppLeader(foil bool) (ret template.HTML)
- func (badge PlayerBadgeSummary) GetIcon() string
- func (badge PlayerBadgeSummary) GetName() string
- func (badge PlayerBadgeSummary) GetPath(foil bool) string
- func (badge PlayerBadgeSummary) GetSpecialLeaders() (ret template.HTML)
- func (badge PlayerBadgeSummary) ID() int
- func (badge PlayerBadgeSummary) IsEvent() bool
- func (badge PlayerBadgeSummary) IsGame() bool
- func (badge PlayerBadgeSummary) IsSpecial() bool
- type PlayerBans
- type PlayerFriend
- func (friend PlayerFriend) BSON() bson.D
- func (friend PlayerFriend) CommunityLink() string
- func (friend PlayerFriend) GetAvatar() string
- func (friend PlayerFriend) GetFriendSince() string
- func (friend PlayerFriend) GetLevel() string
- func (friend PlayerFriend) GetName() string
- func (friend PlayerFriend) GetPath() string
- func (friend PlayerFriend) Scanned() bool
- type PlayerGroup
- func (group PlayerGroup) BSON() bson.D
- func (group PlayerGroup) GetGroupIcon() string
- func (group PlayerGroup) GetGroupPath() string
- func (group PlayerGroup) GetName() string
- func (group PlayerGroup) GetPlayerAvatar() string
- func (group PlayerGroup) GetPlayerAvatar2() string
- func (group PlayerGroup) GetPlayerCommunityLink() string
- func (group PlayerGroup) GetPlayerFlag() string
- func (group PlayerGroup) GetPlayerLink() string
- func (group PlayerGroup) GetPlayerName() string
- func (group PlayerGroup) GetPlayerPath() string
- func (group PlayerGroup) GetType() string
- func (group PlayerGroup) GetURL() string
- func (group PlayerGroup) IsOfficial() bool
- type PlayerRecentApp
- type PlayerWishlistApp
- func (app PlayerWishlistApp) BSON() bson.D
- func (app PlayerWishlistApp) GetHeaderImage() string
- func (app PlayerWishlistApp) GetIcon() (ret string)
- func (app PlayerWishlistApp) GetName() string
- func (app PlayerWishlistApp) GetPath() string
- func (app PlayerWishlistApp) GetReleaseDateNice() string
- func (app PlayerWishlistApp) GetReleaseState() (ret string)
- type ProductPrice
- func GetPrices(offset int64, limit int64, filter bson.D) (prices []ProductPrice, err error)
- func GetPricesByID(IDs []string) (prices []ProductPrice, err error)
- func GetPricesForApps(appIDs []int, cc steamapi.ProductCC) (prices []ProductPrice, err error)
- func GetPricesForProduct(productID int, productType helpers.ProductType, cc steamapi.ProductCC) (prices []ProductPrice, err error)
- type ProfileBadgeStats
- type Sale
- func (sale Sale) BSON() bson.D
- func (sale Sale) GetAppRating() string
- func (sale Sale) GetKey() (ret string)
- func (sale Sale) GetOfferName() string
- func (sale Sale) GetPriceInt() string
- func (sale Sale) GetPriceString(code steamapi.ProductCC) string
- func (sale Sale) GetType() string
- func (sale Sale) IsLowest(code steamapi.ProductCC) int
- type Stat
- func GetStat(typex StatsType, id int) (stat Stat, err error)
- func GetStatByName(name string) (stat Stat, err error)
- func GetStats(offset int64, limit int64, filter bson.D, sort bson.D) (stats []Stat, err error)
- func GetStatsByID(typex StatsType, ids []int) (stats []Stat, err error)
- func GetStatsByType(typex StatsType, ids []int, id int) (stats []Stat, err error)
- func GetStatsForSelect(typex StatsType) (stats []Stat, err error)
- type StatsType
- type StringCount
- type UpdateType
- type Webhook
- type WebhookService
Constants ¶
View Source
const ( PlatformWindows = "windows" PlatformMac = "macos" PlatformLinux = "linux" )
View Source
const ( CollectionAppAchievements collection = "app_achievements" CollectionAppArticles collection = "app_articles" CollectionAppDLC collection = "app_dlc" CollectionAppItems collection = "app_items" CollectionApps collection = "apps" CollectionAppSales collection = "app_offers" CollectionAppSameOwners collection = "app_same_owners" CollectionBundles collection = "bundles" CollectionBundlePrices collection = "bundle_prices" CollectionChangeItems collection = "change_products" CollectionChanges collection = "changes" CollectionChatBotCommands collection = "chat_bot_commands" CollectionDelayQueue collection = "delay_queue" CollectionDiscordGuilds collection = "discord_guilds" CollectionEvents collection = "events" CollectionGroups collection = "groups" CollectionPackageApps collection = "package_apps" CollectionPackages collection = "packages" CollectionWebhooks collection = "patreon_webhooks" CollectionPlayerAchievements collection = "player_achievements" CollectionPlayerAliases collection = "player_aliases" CollectionPlayerApps collection = "player_apps" CollectionPlayerAppsRecent collection = "player_apps_recent" CollectionPlayerBadges collection = "player_badges" CollectionPlayerBadgesSummary collection = "player_badges_summary" CollectionPlayerFriends collection = "player_friends" CollectionPlayerGroups collection = "player_groups" CollectionPlayers collection = "players" CollectionPlayerWishlistApps collection = "player_wishlist_apps" CollectionProductPrices collection = "product_prices" CollectionStats collection = "stats" )
View Source
const ( PrivacyState helpers.Bits = 1 << iota // Friends list, badges, Steam Level, showcases, comments, and group membership. PrivacyStateInventory // Items you've received in games that use Steam Trading. It also includes any Steam Trading Cards you've collected and extra copies or Steam Gifts. PrivacyStateGifts // Always keep Steam Gifts private even if users can see my inventory. PrivacyStateOwnedGames // The list of all games on your Steam account, games you’ve wishlisted, your achievements and your playtime. PrivacyStatePlaytime // Always keep my total playtime private even if users can see my game details. PrivacyStateFriendsList // This controls who can see your list of friends on your Steam Community profile. )
View Source
const BundleTypeCompleteTheSet = "cts"
View Source
const BundleTypePurchaseTogether = "pt"
Variables ¶
View Source
var ErrInvalidAppID = errors.New("invalid app id")
View Source
var ErrInvalidGroupID = errors.New("invalid group id")
View Source
var (
ErrInvalidPackageID = errors.New("invalid package id")
)
View Source
var ErrNoDocuments = mongo.ErrNoDocuments
View Source
var GetPlayersInGameLock sync.Mutex
View Source
var GetPlayersOnlineLock sync.Mutex
Only used for steam app 0
View Source
var PackageOutputForJSON = bson.M{"id": 1, "name": 1, "apps_count": 1, "prices": 1, "change_number_date": 1, "icon": 1, "billing_type": 1}
Functions ¶
func BatchBundles ¶
func BatchPackages ¶
func BatchStats ¶
func BulkUpdatePlayers ¶
func BulkUpdatePlayers(writes []mongo.WriteModel) (err error)
func CountDocuments ¶
func CountFriends ¶
func DeleteAppDLC ¶
func DeleteAppItems ¶
func DeleteFriends ¶
func DeleteMany ¶
func DeleteMany(collection collection, filter bson.D) (resp *mongo.DeleteResult, err error)
func DeleteOne ¶
func DeleteOne(collection collection, filter bson.D) (resp *mongo.DeleteResult, err error)
noinspection GoUnusedExportedFunction
func DeletePackageApps ¶
func DeletePlayerGroups ¶
func DeleteRecentApps ¶
func EnsureIndexes ¶
func EnsureIndexes()
func FindOrCreateStatsByName ¶
func GetDistict ¶
func GetGuildsByIDs ¶
func GetGuildsByIDs(ids []string) (guildsMap map[string]DiscordGuild, err error)
func GetHighestSaleOrder ¶
func GetRandomRows ¶
func GetUniqueSaleTypes ¶
func InsertMany ¶
func InsertMany(collection collection, documents []Document) (resp *mongo.InsertManyResult, err error)
Will skip documents that already exist
func InsertOne ¶
func InsertOne(collection collection, document Document) (resp *mongo.InsertOneResult, err error)
Errors if key already exists
func ReplaceAppAchievements ¶
func ReplaceAppAchievements(achievements []AppAchievement) (err error)
func ReplaceAppDLCs ¶
func ReplaceAppItems ¶
func ReplaceAppSameOwners ¶
func ReplaceAppSameOwners(appID int, sameApps []AppSameOwners) (err error)
func ReplaceArticles ¶
func ReplaceOne ¶
func ReplaceOne(collection collection, filter bson.D, document Document) (resp *mongo.UpdateResult, err error)
Create or update whole document
func ReplacePackageApps ¶
func ReplacePackageApps(apps []PackageApp) (err error)
func ReplacePlayerAchievements ¶
func ReplacePlayerAchievements(achievements []PlayerAchievement) (err error)
func ReplacePlayerAliases ¶
func ReplacePlayerAliases(aliases []PlayerAlias) (err error)
func ReplacePlayerBadges ¶
func ReplacePlayerBadges(badges []PlayerBadge) (err error)
func ReplacePlayerFriends ¶
func ReplacePlayerFriends(friends []*PlayerFriend) (err error)
func ReplacePlayerGroups ¶
func ReplacePlayerGroups(groups []PlayerGroup) (err error)
func ReplacePlayerWishlistApps ¶
func ReplacePlayerWishlistApps(apps []PlayerWishlistApp) (err error)
func ReplaceRecentApps ¶
func ReplaceRecentApps(apps []PlayerRecentApp) (err error)
func ReplaceSales ¶
func SaveWebhook ¶
func SaveWebhook(service WebhookService, event string, body string) error
func UpdateAppsInflux ¶
func UpdateAppsInflux(writes []mongo.WriteModel) (err error)
func UpdateBadgeSummary ¶
func UpdateManySet ¶
func UpdateManySet(collection collection, filter bson.D, update bson.D) (resp *mongo.UpdateResult, err error)
Does NOT upsert
func UpdateManyUnset ¶
func UpdateManyUnset(collection collection, columns bson.D) (resp *mongo.UpdateResult, err error)
noinspection GoUnusedExportedFunction
func UpdateOne ¶
func UpdateOne(collection collection, filter bson.D, update bson.D) (resp *mongo.UpdateResult, err error)
Does not upsert
func UpdatePlayerApps ¶
Types ¶
type App ¶
type App struct { Achievements []helpers.Tuple `bson:"achievements_5"` // Icon -> Title AchievementsAverageCompletion float64 `bson:"achievements_average_completion"` AchievementsCount int `bson:"achievements_count"` AchievementsCountTotal int `bson:"achievements_count_total"` // Including inactive ones AlbumMetaData pics.AlbumMetaData `bson:"albummetadata"` Background string `bson:"background"` BadgeOwners int64 `bson:"badge_owners"` Bundles []int `bson:"bundle_ids"` Categories []int `bson:"categories"` ChangeNumber int `bson:"change_number"` ChangeNumberDate time.Time `bson:"change_number_date"` ComingSoon bool `bson:"coming_soon"` Common pics.PICSKeyValues `bson:"common"` Config pics.PICSKeyValues `bson:"config"` CreatedAt time.Time `bson:"created_at"` Countries map[string]int `bson:"countries"` Demos []int `bson:"demo_ids"` Depots pics.Depots `bson:"depots"` Developers []int `bson:"developers"` DLCCount int `bson:"dlc_count"` Extended pics.PICSKeyValues `bson:"extended"` GameID int `bson:"game_id"` GameName string `bson:"game_name"` Genres []int `bson:"genres"` GroupID string `bson:"group_id"` GroupFollowers int `bson:"group_followers"` Homepage string `bson:"homepage"` Icon string `bson:"icon"` ID int `bson:"_id" json:"id"` Install map[string]interface{} `bson:"install"` IsFree bool `bson:"is_free"` Items int `bson:"items"` ItemsDigest string `bson:"items_digest"` Launch []pics.PICSAppConfigLaunchItem `bson:"launch"` Localization pics.Localisation `bson:"localization"` LocalizationCount int `bson:"localization_count"` MetacriticScore int8 `bson:"metacritic_score"` MetacriticURL string `bson:"metacritic_url"` Movies []helpers.AppVideo `bson:"movies"` Name string `bson:"name"` NewsIDs []int64 `bson:"news_ids"` Owners int64 `bson:"owners"` // On Global Steam Packages []int `bson:"packages"` Platforms []string `bson:"platforms"` PlayerAverageWeek float64 `bson:"player_avg_week"` PlayerPeakAllTime int `bson:"player_peak_alltime"` PlayerPeakAllTimeTime time.Time `bson:"player_peak_alltime_time"` PlayerPeakWeek int `bson:"player_peak_week"` PlayerTrend float64 `bson:"player_trend"` PlaytimeAverage float64 `bson:"playtime_average"` // Minutes PlaytimeTotal int64 `bson:"playtime_total"` // Minutes Prices helpers.ProductPrices `bson:"prices"` PublicOnly bool `bson:"public_only"` Publishers []int `bson:"publishers"` RelatedAppIDs []int `bson:"related_app_ids"` // Taken from store page RelatedOwnersAppIDsDate time.Time `bson:"related_owners_app_ids_date"` // Calculated from owners - Last Updated ReleaseDate string `bson:"release_date"` // Steam release ReleaseDateUnix int64 `bson:"release_date_unix"` // Steam release ReleaseDateOriginal int64 `bson:"release_date_original"` // Game release ReleaseState string `bson:"release_state"` Reviews helpers.AppReviewSummary `bson:"reviews"` ReviewsScore float64 `bson:"reviews_score"` ReviewsCount int `bson:"reviews_count"` Screenshots []helpers.AppImage `bson:"screenshots"` ShortDescription string `bson:"description_short"` Stats []helpers.AppStat `bson:"stats"` SteamSpy helpers.AppSteamSpy `bson:"steam_spy"` SystemRequirements map[string]interface{} `bson:"system_requirements"` Tags []int `bson:"tags"` // Current tags, used for filtering TagCounts []AppTagCount `bson:"tag_counts"` // Includes old tags TwitchID int `bson:"twitch_id"` TwitchURL string `bson:"twitch_url"` Type string `bson:"type"` UFS pics.PICSKeyValues `bson:"ufs"` UpdatedAt time.Time `bson:"updated_at"` Version string `bson:"version"` WishlistAvgPosition float64 `bson:"wishlist_avg_position"` WishlistCount int `bson:"wishlist_count"` WishlistPercent float64 `bson:"wishlist_percent"` WishlistFirsts float64 `bson:"wishlist_firsts"` }
func PopularApps ¶
func PopularNewApps ¶
func TrendingApps ¶
func (App) GetAppRelatedApps ¶
func (App) GetCategories ¶
func (App) GetCommunityLink ¶
func (App) GetCoopTags ¶
func (App) GetDevelopers ¶
func (App) GetDevelopersHTML ¶
func (App) GetFollowers ¶
func (App) GetGroupID ¶
func (App) GetInstallLink ¶
func (App) GetMetaImage ¶
func (App) GetMicroTrailer ¶
func (App) GetPICSUpdatedNice ¶
func (App) GetPathAbsolute ¶
func (App) GetPeakTimeNice ¶
func (App) GetPlatformImages ¶
func (App) GetPlayLink ¶
func (App) GetPlayersInGame ¶
func (App) GetPlayersOnline ¶
func (App) GetPlayersPeakWeek ¶
func (App) GetPlaytimeAverage ¶
func (App) GetPrices ¶
func (app App) GetPrices() (prices helpers.ProductPrices)
func (App) GetProductType ¶
func (app App) GetProductType() helpers.ProductType
func (App) GetPublishers ¶
func (App) GetPublishersHTML ¶
func (App) GetReleaseDateNice ¶
func (App) GetReviewScore ¶
func (App) GetSteamPricesURL ¶
func (App) GetStoreLink ¶
func (App) GetSystemRequirements ¶
func (app App) GetSystemRequirements() (ret []helpers.SystemRequirement)
func (App) GetTypeLower ¶
func (App) GetUpdatedNice ¶
func (App) HasSameOwners ¶
func (App) ShouldUpdate ¶
type AppAchievement ¶
type AppAchievement struct { AppID int `bson:"app_id" json:"app_id"` Key string `bson:"key" json:"key"` Name string `bson:"name" json:"name"` Description string `bson:"description" json:"description"` Icon string `bson:"icon" json:"icon"` Completed float64 `bson:"completed" json:"completed"` Hidden bool `bson:"hidden" json:"hidden"` // Just no description Active bool `bson:"active" json:"active"` // If it's part of the schema response Deleted bool `bson:"deleted" json:"deleted"` // Not in global resp anymore }
func GetAppAchievements ¶
func (AppAchievement) BSON ¶
func (achievement AppAchievement) BSON() bson.D
func (*AppAchievement) Fill ¶
func (achievement *AppAchievement) Fill(appID int, response steamapi.SchemaForGameAchievement)
func (AppAchievement) GetCompleted ¶
func (achievement AppAchievement) GetCompleted() string
func (AppAchievement) GetIcon ¶
func (achievement AppAchievement) GetIcon() string
func (AppAchievement) GetKey ¶
func (achievement AppAchievement) GetKey() string
type AppDLC ¶
type AppDLC struct { AppID int `bson:"app_id"` DLCID int `bson:"dlc_id"` Icon string `bson:"icon"` Name string `bson:"name"` ReleaseDateUnix int64 `bson:"release_date_unix"` ReleaseDateNice string `bson:"release_date_nice"` }
func GetDLCForApp ¶
func GetDLCForApps ¶
type AppItem ¶
type AppItem struct { AppID int `bson:"app_id"` Bundle string `bson:"bundle"` Commodity bool `bson:"commodity"` DateCreated string `bson:"date_created"` Description string `bson:"description"` DisplayType string `bson:"display_type"` DropInterval int `bson:"drop_interval"` DropMaxPerWindow int `bson:"drop_max_per_window"` Exchange []string `bson:"exchange"` Hash string `bson:"hash"` IconURL string `bson:"icon_url"` IconURLLarge string `bson:"icon_url_large"` ItemDefID int `bson:"item_def_id"` ItemQuality string `bson:"item_quality"` Marketable bool `bson:"marketable"` Modified string `bson:"modified"` Name string `bson:"name"` Price string `bson:"price"` Promo string `bson:"promo"` Quantity int `bson:"quantity"` Tags [][]string `bson:"tags"` Timestamp string `bson:"timestamp"` Tradable bool `bson:"tradable"` Type string `bson:"type"` WorkshopID int64 `bson:"workshop_id"` }
func GetAppItems ¶
func (*AppItem) SetExchange ¶
func (AppItem) ShortDescription ¶
type AppReleaseDateCount ¶
type AppReleaseDateCount struct { Date string `json:"date" bson:"_id"` Count int64 `json:"count" bson:"count"` }
func GetAppsGroupedByReleaseDate ¶
func GetAppsGroupedByReleaseDate() (counts []AppReleaseDateCount, err error)
type AppReviewScoreCount ¶
type AppReviewScoreCount struct { Score int64 `json:"score" bson:"_id"` Count int64 `json:"count" bson:"count"` }
func GetAppsGroupedByReviewScore ¶
func GetAppsGroupedByReviewScore() (counts []AppReviewScoreCount, err error)
type AppSameOwners ¶
type AppSameOwners struct { AppID int `bson:"app_id"` SameAppID int `bson:"same_id"` Count int `bson:"count"` // Matching owners Order float64 `bson:"order"` // Score to sort by Owners int `bson:"owners"` // Total owners }
func GetAppSameOwners ¶
func GetAppSameOwners(appID int, limit int64) (sameOwners []AppSameOwners, err error)
func (AppSameOwners) BSON ¶
func (sameOwner AppSameOwners) BSON() bson.D
func (AppSameOwners) GetKey ¶
func (sameOwner AppSameOwners) GetKey() string
type AppTagCount ¶
func (AppTagCount) GetPath ¶
func (t AppTagCount) GetPath() string
type AppTypeCount ¶
type AppTypeCount struct { Type string `json:"type" bson:"_id"` Count int64 `json:"count" bson:"count"` Value int64 `json:"value" bson:"value"` }
func GetAppsGroupedByType ¶
func GetAppsGroupedByType(code steamapi.ProductCC) (counts []AppTypeCount, err error)
type Article ¶
type Article struct { ID int64 `bson:"_id"` Title string `bson:"title"` URL string `bson:"url"` IsExternal bool `bson:"is_external"` Author string `bson:"author"` Contents string `bson:"contents"` Date time.Time `bson:"date"` FeedLabel string `bson:"feed_label"` FeedName string `bson:"feed_name"` FeedType int8 `bson:"feed_type"` AppID int `bson:"app_id"` AppName string `bson:"app_name"` AppIcon string `bson:"app_icon"` ArticleIcon string `bson:"icon"` }
func GetArticles ¶
func (Article) GetAppIcon ¶
func (Article) GetAppPath ¶
func (Article) GetArticleIcon ¶
type ArticleFeed ¶
type ArticleFeed struct { ID string `bson:"_id" json:"id"` Name string `bson:"name" json:"name"` Count int `bson:"count" json:"count"` }
func GetAppArticlesGroupedByFeed ¶
func GetAppArticlesGroupedByFeed(appID int) (feeds []ArticleFeed, err error)
func (ArticleFeed) GetCount ¶
func (af ArticleFeed) GetCount() string
func (ArticleFeed) GetName ¶
func (af ArticleFeed) GetName() string
type Bundle ¶
type Bundle struct { Apps []int `bson:"apps"` CreatedAt time.Time `bson:"created_at"` Discount int `bson:"discount"` DiscountHighest int `bson:"discount_highest"` DiscountLowest int `bson:"discount_lowest"` DiscountSale int `bson:"discount_sale"` Giftable bool `bson:"giftable"` Icon string `bson:"icon"` ID int `bson:"_id"` Image string `bson:"image"` Name string `bson:"name"` OnSale bool `bson:"on_sale"` Packages []int `bson:"packages"` Prices map[steamapi.ProductCC]int `bson:"prices"` PricesSale map[steamapi.ProductCC]int `bson:"prices_sale"` Type string `bson:"type"` UpdatedAt time.Time `bson:"updated_at"` }
func GetBundles ¶
func GetBundlesByID ¶
func (Bundle) GetCreated ¶
func (Bundle) GetCreatedNice ¶
func (Bundle) GetDiscount ¶
func (Bundle) GetDiscountHighest ¶
func (Bundle) GetDiscountSale ¶
func (Bundle) GetPackages ¶
func (Bundle) GetPricesFormatted ¶
func (Bundle) GetPricesSaleFormatted ¶
func (Bundle) GetStoreLink ¶
func (Bundle) GetUpdated ¶
func (Bundle) GetUpdatedNice ¶
func (Bundle) IsGiftable ¶
func (Bundle) OutputForJSON ¶
func (bundle Bundle) OutputForJSON() (output []interface{})
type BundlePrice ¶
type BundlePrice struct { CreatedAt time.Time `bson:"created_at"` BundleID int `bson:"bundle_id"` Discount int `bson:"price"` }
func GetBundlePrices ¶
func GetBundlePrices(filter bson.D) (prices []BundlePrice, err error)
func GetBundlePricesByID ¶
func GetBundlePricesByID(bundleID int) (prices []BundlePrice, err error)
func (BundlePrice) BSON ¶
func (price BundlePrice) BSON() bson.D
func (BundlePrice) GetKey ¶
func (price BundlePrice) GetKey() string
type Change ¶
type Change struct { ID int `bson:"_id"` CreatedAt time.Time `bson:"created_at"` Apps []int `bson:"apps"` Packages []int `bson:"packages"` }
func GetChanges ¶
func (Change) GetNiceDate ¶
func (Change) GetTimestamp ¶
type DiscordGuild ¶
type DiscordGuild struct { ID string `bson:"_id"` Name string `bson:"name"` Icon string `bson:"icon"` Members int `json:"members"` Requests int `json:"requests"` UpdateAt time.Time `json:"update_at"` }
func (DiscordGuild) BSON ¶
func (guild DiscordGuild) BSON() bson.D
type DiscordMessage ¶
type DiscordMessage struct { GuildID string `bson:"guild_id"` ChannelID string `bson:"channel_id"` AuthorID string `bson:"author_id"` CommandID string `bson:"command_id"` AuthorName string `bson:"author_name"` AuthorAvatar string `bson:"author_avatar"` Message string `bson:"message"` Slash bool `bson:"slash"` Time time.Time `bson:"time"` }
func GetChatBotCommandsRecent ¶
func GetChatBotCommandsRecent() (commands []DiscordMessage, err error)
func (DiscordMessage) BSON ¶
func (c DiscordMessage) BSON() bson.D
func (DiscordMessage) GetAvatar ¶
func (c DiscordMessage) GetAvatar() string
func (DiscordMessage) GetCommand ¶
func (c DiscordMessage) GetCommand() string
func (DiscordMessage) GetTableRowJSON ¶
func (c DiscordMessage) GetTableRowJSON(guilds map[string]DiscordGuild) []interface{}
type Event ¶
type Event struct { CreatedAt time.Time `bson:"created_at"` Type EventEnum `bson:"type"` UserID int `bson:"user_id"` UserAgent string `bson:"user_agent"` IP string `bson:"ip"` }
func (Event) GetCreatedNice ¶
type EventEnum ¶
type EventEnum string
var ( EventSignup EventEnum = "signup" EventLogin EventEnum = "login" EventForgotPassword EventEnum = "forgot-password" EventLogout EventEnum = "logout" EventPatreonWebhook EventEnum = "patreon-webhook" EventRefresh EventEnum = "refresh" EventLink = func(provider oauth.ProviderEnum) EventEnum { return EventEnum("link-" + provider) } EventUnlink = func(provider oauth.ProviderEnum) EventEnum { return EventEnum("unlink-" + provider) } )
type Group ¶
type Group struct { ID string `bson:"_id"` // Too big for int64 in Javascript (Mongo BD) CreatedAt time.Time `bson:"created_at"` UpdatedAt time.Time `bson:"updated_at"` Name string `bson:"name"` Abbr string `bson:"abbreviation"` URL string `bson:"url"` AppID int `bson:"app_id"` Headline string `bson:"headline"` Summary string `bson:"summary"` Icon string `bson:"icon"` Trending float64 `bson:"trending"` Members int `bson:"members"` MembersInChat int `bson:"members_in_chat"` MembersInGame int `bson:"members_in_game"` MembersOnline int `bson:"members_online"` Error string `bson:"error"` Type string `bson:"type"` Primaries int `bson:"primaries"` }
func GetGroupsByID ¶
func TrendingGroups ¶
func (Group) GetIconAbsolute ¶
func (Group) IsOfficial ¶
func (Group) ShouldUpdate ¶
type Package ¶
type Package struct { Apps []int `bson:"apps"` AppItems map[int]int `bson:"app_items"` AppsCount int `bson:"apps_count"` Bundles []int `bson:"bundle_ids"` BillingType int32 `bson:"billing_type"` ChangeNumber int `bson:"change_id"` ChangeNumberDate time.Time `bson:"change_number_date"` ComingSoon bool `bson:"coming_soon"` Controller pics.PICSController `bson:"controller"` CreatedAt time.Time `bson:"created_at"` Depots []int `bson:"depot_ids"` Extended pics.PICSKeyValues `bson:"extended"` Icon string `bson:"icon"` ID int `bson:"_id" json:"id"` ImageLogo string `bson:"image_logo"` ImagePage string `bson:"image_page"` InStore bool `bson:"in_store"` // todo LicenseType int32 `bson:"license_type"` Name string `bson:"name"` Platforms []string `bson:"platforms"` Prices helpers.ProductPrices `bson:"prices"` PurchaseText string `bson:"purchase_text"` ReleaseDate string `bson:"release_date"` ReleaseDateUnix int64 `bson:"release_date_unix"` Status int8 `bson:"status"` UpdatedAt time.Time `bson:"updated_at"` }
func GetPackage ¶
func GetPackages ¶
func GetPackagesByID ¶
func (Package) GetBillingType ¶
func (Package) GetBundles ¶
func (Package) GetComingSoon ¶
func (Package) GetLicenseType ¶
func (Package) GetMetaImage ¶
func (Package) GetPICSUpdatedNice ¶
func (Package) GetPlatformImages ¶
func (Package) GetPrices ¶
func (pack Package) GetPrices() (prices helpers.ProductPrices)
func (Package) GetProductType ¶
func (pack Package) GetProductType() helpers.ProductType
func (Package) GetUpdatedNice ¶
func (Package) HasEmptyIcon ¶
func (Package) HasEmptyName ¶
func (Package) OutputForJSON ¶
func (Package) ShouldUpdate ¶
type PackageApp ¶
type PackageApp struct { PackageID int `bson:"package_id"` AppID int `bson:"app_id"` AppIcon string `bson:"app_icon"` AppName string `bson:"app_name"` AppType string `bson:"app_type"` AppPlatforms []string `bson:"app_platforms"` AppDLCCount int `bson:"app_dlc_count"` }
func GetPackageApps ¶
func (PackageApp) BSON ¶
func (app PackageApp) BSON() bson.D
type Player ¶
type Player struct { AchievementCount int `bson:"achievement_count"` // Number of achievements AchievementCount100 int `bson:"achievement_count_100"` // Number of 100% games AchievementCountApps int `bson:"achievement_count_apps"` // Number of games with an achievement Avatar string `bson:"avatar"` BackgroundAppID int `bson:"background_app_id"` BadgesCount int `bson:"badges_count"` BadgesFoilCount int `bson:"badges_foil_count"` BadgeStats ProfileBadgeStats `bson:"badge_stats"` Bans PlayerBans `bson:"bans"` CommentsCount int `bson:"comments_count"` CommunityVisibilityState int `bson:"community_visibility_state"` // 1=private 3=public ContinentCode string `bson:"continent_code"` CountryCode string `bson:"country_code"` CreatedAt time.Time `bson:"created_at"` // Added late Donated int `bson:"donated"` FriendsCount int `bson:"friends_count"` GamesByType map[string]int `bson:"games_by_type"` GamesCount int `bson:"games_count"` GameStats PlayerAppStatsTemplate `bson:"game_stats"` GroupsCount int `bson:"groups_count"` ID int64 `bson:"_id"` LastBan time.Time `bson:"bans_last"` Level int `bson:"level"` NumberOfGameBans int `bson:"bans_game"` NumberOfVACBans int `bson:"bans_cav"` Permissions helpers.Bits `bson:"permissions"` PersonaName string `bson:"persona_name"` PlayTime int `bson:"play_time"` PlayTimeWindows int `bson:"play_time_windows"` PlayTimeMac int `bson:"play_time_mac"` PlayTimeLinux int `bson:"play_time_linux"` PrimaryGroupID string `bson:"primary_clan_id_string"` Private bool `bson:"private"` Ranks map[helpers.RankMetric]int `bson:"ranks"` RecentAppsCount int `bson:"recent_apps_count"` Removed bool `bson:"removed"` // Removed from Steam AwardsGivenCount int `bson:"awards_given_count"` AwardsGivenPoints int `bson:"awards_given_points"` AwardsReceivedCount int `bson:"awards_received_count"` AwardsReceivedPoints int `bson:"awards_received_points"` StateCode string `bson:"status_code"` TimeCreated time.Time `bson:"time_created"` // Created on Steam UpdatedAt time.Time `bson:"updated_at"` VanityURL string `bson:"vanity_url"` WishlistAppsCount int `bson:"wishlist_apps_count"` WishlistTotalCost map[steamapi.ProductCC]int `bson:"wishlist_total_cost"` }
func GetPlayers ¶
func GetPlayersByID ¶
func (Player) CommunityLink ¶
func (Player) FriendsLink ¶
func (Player) GetAchievements ¶
func (Player) GetAvatar2 ¶
func (Player) GetAvatarAbsolute ¶
func (Player) GetBadgesFoil ¶
func (Player) GetCountry ¶
func (Player) GetFriendLink ¶
func (Player) GetGameBans ¶
func (Player) GetGamesCount ¶
func (Player) GetLastBan ¶
func (Player) GetMaxFriends ¶
func (Player) GetMessageLink ¶
func (Player) GetPathAbsolute ¶
func (Player) GetPlaytime ¶
func (Player) GetPlaytimePercent ¶
func (Player) GetPlaytimeShort ¶
func (Player) GetStateName ¶
func (Player) GetSteamTimeNice ¶
func (Player) GetSteamTimeUnix ¶
func (Player) GetUpdatedNice ¶
func (Player) GetUpdatedUnix ¶
func (Player) GetVACBans ¶
func (Player) GetWishlistTotal ¶
func (Player) GroupsLink ¶
func (Player) NeedsUpdate ¶
func (player Player) NeedsUpdate(updateType UpdateType) bool
func (Player) WishlistLink ¶
type PlayerAchievement ¶
type PlayerAchievement struct { PlayerID int64 `bson:"player_id"` PlayerName string `bson:"player_name"` PlayerIcon string `bson:"player_icon"` AppID int `bson:"app_id"` AppName string `bson:"app_name"` AppIcon string `bson:"app_icon"` AchievementID string `bson:"achievement_id"` AchievementName string `bson:"achievement_name"` AchievementIcon string `bson:"achievement_icon"` AchievementDescription string `bson:"achievement_description"` AchievementDate int64 `bson:"achievement_date"` AchievementComplete float64 `bson:"achievement_complete"` // Percent }
func GetPlayerAchievementsByPlayerAndApp ¶
func GetPlayerAchievementsByPlayerAndApp(playerID int64, appID int) (achievements []PlayerAchievement, err error)
func GetPlayerAchievementsByPlayersAndApp ¶
func GetPlayerAchievementsByPlayersAndApp(playerIDs []int64, appID int) (achievements []PlayerAchievement, err error)
func (PlayerAchievement) BSON ¶
func (a PlayerAchievement) BSON() bson.D
func (PlayerAchievement) GetAchievementIcon ¶
func (a PlayerAchievement) GetAchievementIcon() string
func (PlayerAchievement) GetComplete ¶
func (a PlayerAchievement) GetComplete() string
func (PlayerAchievement) GetDate ¶
func (a PlayerAchievement) GetDate() string
type PlayerAlias ¶
type PlayerAlias struct { PlayerID int64 `bson:"player_id"` PlayerName string `bson:"player_name"` Time int64 `bson:"time"` }
func GetPlayerAliases ¶
func GetPlayerAliases(playerID int64, limit int64, afterTimestamp int64) (aliases []PlayerAlias, err error)
func (PlayerAlias) BSON ¶
func (a PlayerAlias) BSON() bson.D
func (PlayerAlias) GetTime ¶
func (a PlayerAlias) GetTime() string
type PlayerApp ¶
type PlayerApp struct { PlayerID int64 `bson:"player_id"` PlayerCountry string `json:"player_country"` AppID int `bson:"app_id"` AppName string `bson:"app_name"` AppIcon string `bson:"app_icon"` AppTime int `bson:"app_time"` AppPrices map[string]int `bson:"app_prices"` AppPriceHour map[string]float64 `bson:"app_prices_hour"` AppDLCCount int `bson:"app_dlc_count"` AppAchievementsTotal int `bson:"app_achievements_total"` AppAchievementsHave int `bson:"app_achievements_have"` AppAchievementsPercent float64 `bson:"app_achievements_percent"` }
func GetAppOwners ¶
func GetAppPlayTimes ¶
func GetPlayerAppByKey ¶
func GetPlayerApps ¶
func GetPlayerAppsByApp ¶
func GetPlayerAppsByPlayer ¶
func GetPlayerAppsByPlayers ¶
func (PlayerApp) BSONUpdate ¶
Missing achievement columns so when we update a row we dont overwrite achievements
func (PlayerApp) GetAchievementPercent ¶
func (PlayerApp) GetHeaderImage ¶
func (PlayerApp) GetPriceFormatted ¶
func (PlayerApp) GetPriceHourFormatted ¶
func (PlayerApp) GetStoreLink ¶
func (PlayerApp) GetTimeNice ¶
func (PlayerApp) GetTimeNiceLong ¶
type PlayerAppStatsTemplate ¶
type PlayerAppStatsTemplate struct { Played playerAppStatsInnerTemplate All playerAppStatsInnerTemplate }
type PlayerAppsByCountry ¶
type PlayerAppsByCountry struct { Country string `json:"type" bson:"_id"` Count int `json:"count" bson:"count"` }
func GetAppPlayersByCountry ¶
func GetAppPlayersByCountry(appID int) (items []PlayerAppsByCountry, err error)
type PlayerBadge ¶
type PlayerBadge struct { AppID int `bson:"app_id"` AppName string `bson:"app_name"` BadgeCompletionTime time.Time `bson:"badge_completion_time"` BadgeFoil bool `bson:"badge_foil"` BadgeIcon string `bson:"badge_icon"` BadgeID int `bson:"badge_id"` BadgeItemID int64 `bson:"-"` BadgeLevel int `bson:"badge_level"` BadgeScarcity int `bson:"badge_scarcity"` BadgeXP int `bson:"badge_xp"` PlayerID int64 `bson:"player_id"` PlayerName string `bson:"player_name"` PlayerIcon string `bson:"player_icon"` }
func GetAppBadge ¶
func GetAppBadge(appID int) (badge PlayerBadge, err error)
Get the first PlayerBadge for an app ID
func GetBadgePlayers ¶
func GetBadgePlayers(offset int64, filter bson.D) (badges []PlayerBadge, err error)
func GetPlayerBadges ¶
func (PlayerBadge) BSON ¶
func (badge PlayerBadge) BSON() bson.D
func (PlayerBadge) GetAppPath ¶
func (badge PlayerBadge) GetAppPath() string
func (PlayerBadge) GetIcon ¶
func (badge PlayerBadge) GetIcon() string
func (PlayerBadge) GetKey ¶
func (badge PlayerBadge) GetKey() string
func (PlayerBadge) GetName ¶
func (badge PlayerBadge) GetName() string
func (PlayerBadge) GetPath ¶
func (badge PlayerBadge) GetPath() string
func (PlayerBadge) GetPathToggle ¶
func (badge PlayerBadge) GetPathToggle() string
func (PlayerBadge) GetPlayerCommunityLink ¶
func (badge PlayerBadge) GetPlayerCommunityLink() string
func (PlayerBadge) GetPlayerIcon ¶
func (badge PlayerBadge) GetPlayerIcon() string
func (PlayerBadge) GetPlayerName ¶
func (badge PlayerBadge) GetPlayerName() string
func (PlayerBadge) GetPlayerPath ¶
func (badge PlayerBadge) GetPlayerPath() string
func (PlayerBadge) GetType ¶
func (badge PlayerBadge) GetType() string
func (PlayerBadge) ID ¶
func (badge PlayerBadge) ID() int
func (PlayerBadge) IsEvent ¶
func (badge PlayerBadge) IsEvent() bool
func (PlayerBadge) IsGame ¶
func (badge PlayerBadge) IsGame(appID int) bool
func (PlayerBadge) IsSpecial ¶
func (badge PlayerBadge) IsSpecial() bool
type PlayerBadgeSummary ¶
type PlayerBadgeSummary struct { AppID int `bson:"app_id"` BadgeID int `bson:"badge_id"` AppName string `bson:"app_name"` AppIcon string `bson:"app_icon"` PlayersCount int64 `bson:"players"` MaxLevel int `bson:"max_level"` MaxLevelFoil int `bson:"max_level_foil"` Leaders map[string]string `bson:"leaders"` // Must use string for playerID as it's a JSON key LeadersFoil map[string]string `bson:"leaders_foil"` // Must use string for playerID as it's a JSON key UpdatedAt int64 `bson:"updated_at"` }
func GetBadgeSummaries ¶
func GetBadgeSummaries() (badges []PlayerBadgeSummary, err error)
func (PlayerBadgeSummary) BSON ¶
func (badge PlayerBadgeSummary) BSON() bson.D
func (PlayerBadgeSummary) GetAppLeader ¶
func (badge PlayerBadgeSummary) GetAppLeader(foil bool) (ret template.HTML)
func (PlayerBadgeSummary) GetIcon ¶
func (badge PlayerBadgeSummary) GetIcon() string
func (PlayerBadgeSummary) GetName ¶
func (badge PlayerBadgeSummary) GetName() string
func (PlayerBadgeSummary) GetPath ¶
func (badge PlayerBadgeSummary) GetPath(foil bool) string
func (PlayerBadgeSummary) GetSpecialLeaders ¶
func (badge PlayerBadgeSummary) GetSpecialLeaders() (ret template.HTML)
func (PlayerBadgeSummary) ID ¶
func (badge PlayerBadgeSummary) ID() int
func (PlayerBadgeSummary) IsEvent ¶
func (badge PlayerBadgeSummary) IsEvent() bool
func (PlayerBadgeSummary) IsGame ¶
func (badge PlayerBadgeSummary) IsGame() bool
func (PlayerBadgeSummary) IsSpecial ¶
func (badge PlayerBadgeSummary) IsSpecial() bool
type PlayerBans ¶
type PlayerBans struct { CommunityBanned bool `json:"community_banned"` VACBanned bool `json:"vac_banned"` NumberOfVACBans int `json:"number_of_vac_bans"` DaysSinceLastBan int `json:"days_since_last_ban"` NumberOfGameBans int `json:"number_of_game_bans"` EconomyBan string `json:"economy_ban"` }
func (PlayerBans) History ¶
func (pb PlayerBans) History() bool
type PlayerFriend ¶
type PlayerFriend struct { PlayerID int64 `bson:"player_id"` // From Steam API FriendID int64 `bson:"friend_id"` // From Steam API FriendSince time.Time `bson:"since"` // From Steam API Avatar string `bson:"avatar"` // Name string `bson:"name"` // Games int `bson:"games"` // Level int `bson:"level"` // Relationship string `bson:"relationship"` // From Steam API }
func GetFriends ¶
func (PlayerFriend) BSON ¶
func (friend PlayerFriend) BSON() bson.D
func (PlayerFriend) CommunityLink ¶
func (friend PlayerFriend) CommunityLink() string
func (PlayerFriend) GetAvatar ¶
func (friend PlayerFriend) GetAvatar() string
func (PlayerFriend) GetFriendSince ¶
func (friend PlayerFriend) GetFriendSince() string
func (PlayerFriend) GetLevel ¶
func (friend PlayerFriend) GetLevel() string
func (PlayerFriend) GetName ¶
func (friend PlayerFriend) GetName() string
func (PlayerFriend) GetPath ¶
func (friend PlayerFriend) GetPath() string
func (PlayerFriend) Scanned ¶
func (friend PlayerFriend) Scanned() bool
type PlayerGroup ¶
type PlayerGroup struct { PlayerID int64 `bson:"player_id"` PlayerName string `bson:"player_name"` PlayerAvatar string `bson:"player_avatar"` PlayerCountry string `bson:"player_country"` PlayerLevel int `bson:"player_level"` PlayerGames int `bson:"player_games"` GroupID string `bson:"group_id"` GroupName string `bson:"group_name"` GroupIcon string `bson:"group_icon"` GroupMembers int `bson:"group_members"` GroupType string `bson:"group_type"` GroupURL string `bson:"group_url"` }
func GetGroupPlayers ¶
func GetPlayerGroups ¶
func (PlayerGroup) BSON ¶
func (group PlayerGroup) BSON() bson.D
func (PlayerGroup) GetGroupIcon ¶
func (group PlayerGroup) GetGroupIcon() string
func (PlayerGroup) GetGroupPath ¶
func (group PlayerGroup) GetGroupPath() string
func (PlayerGroup) GetName ¶
func (group PlayerGroup) GetName() string
func (PlayerGroup) GetPlayerAvatar ¶
func (group PlayerGroup) GetPlayerAvatar() string
func (PlayerGroup) GetPlayerAvatar2 ¶
func (group PlayerGroup) GetPlayerAvatar2() string
func (PlayerGroup) GetPlayerCommunityLink ¶
func (group PlayerGroup) GetPlayerCommunityLink() string
func (PlayerGroup) GetPlayerFlag ¶
func (group PlayerGroup) GetPlayerFlag() string
func (PlayerGroup) GetPlayerLink ¶
func (group PlayerGroup) GetPlayerLink() string
func (PlayerGroup) GetPlayerName ¶
func (group PlayerGroup) GetPlayerName() string
func (PlayerGroup) GetPlayerPath ¶
func (group PlayerGroup) GetPlayerPath() string
func (PlayerGroup) GetType ¶
func (group PlayerGroup) GetType() string
func (PlayerGroup) GetURL ¶
func (group PlayerGroup) GetURL() string
func (PlayerGroup) IsOfficial ¶
func (group PlayerGroup) IsOfficial() bool
type PlayerRecentApp ¶
type PlayerRecentApp struct { PlayerID int64 `bson:"player_id"` AppID int `bson:"app_id"` AppName string `bson:"name"` PlayTime2Weeks int `bson:"playtime_2_weeks"` // Minutes PlayTimeForever int `bson:"playtime_forever"` // Minutes Icon string `bson:"icon"` }
func GetRecentApps ¶
func (PlayerRecentApp) BSON ¶
func (app PlayerRecentApp) BSON() bson.D
func (PlayerRecentApp) GetHeaderImage ¶
func (app PlayerRecentApp) GetHeaderImage() string
func (PlayerRecentApp) GetIcon ¶
func (app PlayerRecentApp) GetIcon() string
type PlayerWishlistApp ¶
type PlayerWishlistApp struct { PlayerID int64 `bson:"player_id"` Order int `bson:"order"` AppID int `bson:"app_id"` AppName string `bson:"app_name"` AppIcon string `bson:"app_icon"` AppReleaseState string `bson:"app_release_state"` AppReleaseDate time.Time `bson:"app_release_date"` AppReleaseDateNice string `bson:"app_release_date_nice"` AppPrices map[steamapi.ProductCC]int `bson:"app_prices"` }
func GetPlayerWishlistAppsByApp ¶
func GetPlayerWishlistAppsByApp(appID int) (apps []PlayerWishlistApp, err error)
func (PlayerWishlistApp) BSON ¶
func (app PlayerWishlistApp) BSON() bson.D
func (PlayerWishlistApp) GetHeaderImage ¶
func (app PlayerWishlistApp) GetHeaderImage() string
func (PlayerWishlistApp) GetIcon ¶
func (app PlayerWishlistApp) GetIcon() (ret string)
func (PlayerWishlistApp) GetName ¶
func (app PlayerWishlistApp) GetName() string
func (PlayerWishlistApp) GetPath ¶
func (app PlayerWishlistApp) GetPath() string
func (PlayerWishlistApp) GetReleaseDateNice ¶
func (app PlayerWishlistApp) GetReleaseDateNice() string
func (PlayerWishlistApp) GetReleaseState ¶
func (app PlayerWishlistApp) GetReleaseState() (ret string)
type ProductPrice ¶
type ProductPrice struct { CreatedAt time.Time `bson:"created_at"` AppID int `bson:"app_id"` PackageID int `bson:"package_id"` Currency steamapi.CurrencyCode `bson:"currency"` ProdCC steamapi.ProductCC `bson:"prod_cc"` Name string `bson:"name"` Icon string `bson:"icon"` PriceBefore int `bson:"price_before"` PriceAfter int `bson:"price_after"` Difference int `bson:"difference"` DifferencePercent float64 `bson:"difference_percent"` }
func GetPricesByID ¶
func GetPricesByID(IDs []string) (prices []ProductPrice, err error)
func GetPricesForApps ¶
func GetPricesForApps(appIDs []int, cc steamapi.ProductCC) (prices []ProductPrice, err error)
func GetPricesForProduct ¶
func GetPricesForProduct(productID int, productType helpers.ProductType, cc steamapi.ProductCC) (prices []ProductPrice, err error)
func (ProductPrice) BSON ¶
func (price ProductPrice) BSON() bson.D
func (ProductPrice) GetIcon ¶
func (price ProductPrice) GetIcon() string
func (ProductPrice) GetPath ¶
func (price ProductPrice) GetPath() string
func (ProductPrice) GetPercentChange ¶
func (price ProductPrice) GetPercentChange() float64
func (ProductPrice) OutputForJSON ¶
func (price ProductPrice) OutputForJSON() (output []interface{})
type ProfileBadgeStats ¶
type Sale ¶
type Sale struct { SubID int `bson:"sub_id"` SubOrder int `bson:"sub_order"` // Order in the API response AppID int `bson:"app_id"` AppName string `bson:"app_name"` AppIcon string `bson:"app_icon"` AppRating float64 `bson:"app_rating"` AppReleaseDate time.Time `bson:"app_date"` AppReleaseDateString string `bson:"app_date_string"` AppPrices map[steamapi.ProductCC]int `bson:"app_prices"` AppLowestPrice map[steamapi.ProductCC]int `bson:"app_lowest_price"` AppPlayersWeek int `bson:"app_players"` AppCategories []int `bson:"app_categories"` AppType string `bson:"app_type"` AppPlatforms []string `bson:"app_platforms"` AppTags []int `bson:"app_tags"` SaleStart time.Time `bson:"offer_start"` SaleEnd time.Time `bson:"offer_end"` SaleEndEstimate bool `bson:"offer_end_estimate"` SaleType string `bson:"offer_type"` SalePercent int `bson:"offer_percent"` SaleName string `bson:"offer_name"` }
func GetAllSales ¶
func GetAppSales ¶
func (Sale) GetAppRating ¶
func (Sale) GetOfferName ¶
func (Sale) GetPriceInt ¶
type Stat ¶
type Stat struct { Type StatsType `bson:"type"` ID int `bson:"id"` Name string `bson:"name"` Apps int `bson:"apps"` AppsPercnt float32 `bson:"apps_percent"` MeanPrice map[steamapi.ProductCC]float32 `bson:"mean_price"` MeanScore float32 `bson:"mean_score"` MeanPlayers float64 `bson:"mean_players"` MedianPrice map[steamapi.ProductCC]int `bson:"median_price"` MedianScore float32 `bson:"median_score"` MedianPlayers int `bson:"median_players"` MaxDiscount map[steamapi.ProductCC]int `bson:"max_discount"` }
func GetStatByName ¶
func GetStatsByType ¶
func GetStatsForSelect ¶
type StringCount ¶
func GetEventCounts ¶
func GetEventCounts(userID int) (counts []StringCount, err error)
type UpdateType ¶
type UpdateType string
const ( PlayerUpdateAuto UpdateType = "auto" PlayerUpdateManual UpdateType = "manual" PlayerUpdateAdmin UpdateType = "admin" )
type Webhook ¶
type Webhook struct { CreatedAt time.Time `bson:"created_at"` Service WebhookService `bson:"service"` Event string `bson:"event"` RequestBody string `bson:"request_body"` }
func GetWebhooks ¶
type WebhookService ¶
type WebhookService string
const ( WebhookServicePatreon WebhookService = "patreon" WebhookServiceGithub WebhookService = "github" WebhookServiceTwitter WebhookService = "twitter" WebhookServiceSendgrid WebhookService = "sendgrid" WebhookServiceMailjet WebhookService = "mailjet" )
func (WebhookService) ToString ¶
func (s WebhookService) ToString() string
Source Files ¶
- app.go
- app_achievement.go
- app_article.go
- app_dlc.go
- app_item.go
- app_same_owners.go
- bundle.go
- bundle_price.go
- change.go
- discord_guilds.go
- discord_message.go
- event.go
- group.go
- mongo.go
- package.go
- package_app.go
- player.go
- player_achievement.go
- player_alias.go
- player_app.go
- player_app_recent.go
- player_badge.go
- player_badge_summary.go
- player_friend.go
- player_group.go
- player_wishlist_app.go
- product_price.go
- sale.go
- stat.go
- webhook.go
Click to show internal directories.
Click to hide internal directories.