Documentation ¶
Index ¶
- Constants
- Variables
- func CollectionBGGRating(rate int) gobgg.CollectionOptionSetter
- func CollectionCollID(collID int64) gobgg.CollectionOptionSetter
- func CollectionExcludeSubtype(subType ItemType) gobgg.CollectionOptionSetter
- func CollectionIDs(ids ...int64) gobgg.CollectionOptionSetter
- func CollectionMaxPlays(plays int) gobgg.CollectionOptionSetter
- func CollectionMinBGGRating(rate int) gobgg.CollectionOptionSetter
- func CollectionMinPlays(plays int) gobgg.CollectionOptionSetter
- func CollectionMinRating(rate int) gobgg.CollectionOptionSetter
- func CollectionModifiedSince(t time.Time) gobgg.CollectionOptionSetter
- func CollectionRating(rate int) gobgg.CollectionOptionSetter
- func CollectionSubType(subType ItemType) gobgg.CollectionOptionSetter
- func CollectionTypes(typ ...gobgg.CollectionType) gobgg.CollectionOptionSetter
- func CollectionVersion(version bool) gobgg.CollectionOptionSetter
- func GetFromCacheOrBgg[T any](cacheFilename string, retriever func(context.Context, *gobgg.BGG) ([]T, error)) ([]T, error)
- func GetThingIDs(ids ...int64) gobgg.GetOptionSetter
- func PlaysDateRangeMax(max time.Time) gobgg.PlaysOptionSetter
- func PlaysDateRangeMin(min time.Time) gobgg.PlaysOptionSetter
- func PlaysGameID(id int) gobgg.PlaysOptionSetter
- func PlaysPageNumber(page int) gobgg.PlaysOptionSetter
- func PlaysUserName(name string) gobgg.PlaysOptionSetter
- func WriteGeeklistToDir(gl Geeklist, dest string) error
- type CollectionItem
- type Geeklist
- type GeeklistItems
- type ItemData
- type ItemType
- type Play
- type Player
- type Thing
Constants ¶
const ( // CollectionTypeOwn is the owned items CollectionTypeOwn gobgg.CollectionType = "own" // CollectionTypeRated is rated items CollectionTypeRated gobgg.CollectionType = "rated" // CollectionTypePlayed is played items CollectionTypePlayed gobgg.CollectionType = "played" // CollectionTypeComment is commented items CollectionTypeComment gobgg.CollectionType = "comment" // CollectionTypeTrade is in trade list item CollectionTypeTrade gobgg.CollectionType = "trade" // CollectionTypeWant is in want list item CollectionTypeWant gobgg.CollectionType = "want" // CollectionTypeWishList is the wishlist items CollectionTypeWishList gobgg.CollectionType = "wishlist" // CollectionTypePreorder is the pre orders item CollectionTypePreorder gobgg.CollectionType = "preorder" // CollectionTypeWantToPlay is want to play items CollectionTypeWantToPlay gobgg.CollectionType = "wanttoplay" // CollectionTypeWantToBuy is want to buy items CollectionTypeWantToBuy gobgg.CollectionType = "wanttobuy" // CollectionTypePrevOwned is previously owned items CollectionTypePrevOwned gobgg.CollectionType = "prevowned" // CollectionTypeHasParts has parts item CollectionTypeHasParts gobgg.CollectionType = "hasparts" // CollectionTypeWantParts want parts item CollectionTypeWantParts gobgg.CollectionType = "wantparts" )
const ( // WishListPriorityMustHave BGA definition WishListPriorityMustHave = iota + 1 // WishListPriorityLoveToHave BGA definition WishListPriorityLoveToHave // WishListPriorityLikeToHave BGA definition WishListPriorityLikeToHave // WishListPriorityThinkingAboutIt BGA definition WishListPriorityThinkingAboutIt // WishListPriorityDoNotBuy BGA definition WishListPriorityDoNotBuy )
const BGG_PRIVATE_API_BASE_URL = "https://api.geekdo.com/api"
Variables ¶
var Top200ListsByYear = map[int]string{
2014: "182648",
2015: "200265",
2016: "217988",
2017: "233582",
2018: "248275",
2019: "264253",
2020: "277814",
2021: "291071",
2022: "306154",
2023: "324731",
2024: "345687",
}
Functions ¶
func CollectionBGGRating ¶
func CollectionBGGRating(rate int) gobgg.CollectionOptionSetter
SetBGGRating is the exact bgg rating for this item
func CollectionCollID ¶
func CollectionCollID(collID int64) gobgg.CollectionOptionSetter
func CollectionExcludeSubtype ¶
func CollectionExcludeSubtype(subType ItemType) gobgg.CollectionOptionSetter
SetExcludeSubtype Specifies which subtype you want to exclude from the results.
func CollectionIDs ¶
func CollectionIDs(ids ...int64) gobgg.CollectionOptionSetter
func CollectionMaxPlays ¶
func CollectionMaxPlays(plays int) gobgg.CollectionOptionSetter
SetMaxPlays show games with max plays
func CollectionMinBGGRating ¶
func CollectionMinBGGRating(rate int) gobgg.CollectionOptionSetter
SetMinBGGRating is the minimum bgg rating for this item
func CollectionMinPlays ¶
func CollectionMinPlays(plays int) gobgg.CollectionOptionSetter
SetMinPlays show games with min plays
func CollectionMinRating ¶
func CollectionMinRating(rate int) gobgg.CollectionOptionSetter
SetMinRating is the minimum personal rating for this item for this user
func CollectionModifiedSince ¶
func CollectionModifiedSince(t time.Time) gobgg.CollectionOptionSetter
SetModifiedSince to set the modified since flag
func CollectionRating ¶
func CollectionRating(rate int) gobgg.CollectionOptionSetter
SetRating is the exact personal rating for this item for this user
func CollectionSubType ¶
func CollectionSubType(subType ItemType) gobgg.CollectionOptionSetter
SetSubType Specifies which collection you want to retrieve. TYPE may be boardgame, boardgameexpansion, boardgameaccessory, rpgitem, rpgissue, or videogame; the default is boardgame
func CollectionTypes ¶
func CollectionTypes(typ ...gobgg.CollectionType) gobgg.CollectionOptionSetter
SetCollectionTypes returns the collection types
func CollectionVersion ¶
func CollectionVersion(version bool) gobgg.CollectionOptionSetter
SetVersion Returns version info for each item in your collection.
func GetFromCacheOrBgg ¶
func GetThingIDs ¶
func GetThingIDs(ids ...int64) gobgg.GetOptionSetter
func PlaysDateRangeMax ¶
func PlaysDateRangeMax(max time.Time) gobgg.PlaysOptionSetter
PlaysDateRangeMax set the min date
func PlaysDateRangeMin ¶
func PlaysDateRangeMin(min time.Time) gobgg.PlaysOptionSetter
PlaysDateRangeMin set the min date
func PlaysPageNumber ¶
func PlaysPageNumber(page int) gobgg.PlaysOptionSetter
PlaysPageNumber set the current page
func PlaysUserName ¶
func PlaysUserName(name string) gobgg.PlaysOptionSetter
PlaysUserName for the plays
func WriteGeeklistToDir ¶
Types ¶
type CollectionItem ¶
type CollectionItem gobgg.CollectionItem
func GetCachedCollection ¶
func GetCachedCollection(cacheFilename, username string, options ...gobgg.CollectionOptionSetter) ([]CollectionItem, error)
type Geeklist ¶
type Geeklist struct { Type string `json:"type"` ID string `json:"id"` Name string `json:"name"` Creator int `json:"creator"` Href string `json:"href"` Postdate time.Time `json:"postdate"` Editdate time.Time `json:"editdate"` Body string `json:"body"` BodyXML string `json:"bodyXml"` Private bool `json:"private"` PublicAdditionsAllowed bool `json:"publicAdditionsAllowed"` CommentsAllowed bool `json:"commentsAllowed"` Trade bool `json:"trade"` OrdinalDirection string `json:"ordinalDirection"` Submitted bool `json:"submitted"` SortType string `json:"sortType"` Domains []string `json:"domains"` CanonicalLink string `json:"canonical_link"` Links []struct { Rel string `json:"rel"` URI string `json:"uri"` } `json:"links"` Items GeeklistItems }
func GetGeeklistByID ¶
func GetGeeklistFromBGG ¶
func ReadGeeklistFromFile ¶
type GeeklistItems ¶
type ItemData ¶
type ItemData struct { Type string `json:"type"` ID string `json:"id"` Listid string `json:"listid"` Item struct { Type string `json:"type"` ID string `json:"id"` Name string `json:"name"` Href string `json:"href"` Label string `json:"label"` Labelpl string `json:"labelpl"` HasAngularLink bool `json:"hasAngularLink"` Descriptors []struct { Name string `json:"name"` DisplayValue string `json:"displayValue"` } `json:"descriptors"` Breadcrumbs []any `json:"breadcrumbs"` ImageSets struct { Square100 struct { Src string `json:"src"` Src2X string `json:"src@2x"` } `json:"square100"` Mediacard100 struct { Src string `json:"src"` Src2X string `json:"src@2x"` } `json:"mediacard100"` Mediacard struct { Src string `json:"src"` Src2X string `json:"src@2x"` } `json:"mediacard"` } `json:"imageSets"` Imageid int `json:"imageid"` NameSortIndex int `json:"nameSortIndex"` } `json:"item"` Postdate time.Time `json:"postdate"` Editdate time.Time `json:"editdate"` Body string `json:"body"` BodyXML string `json:"bodyXml"` Author int `json:"author"` Href string `json:"href"` Imageid int `json:"imageid"` ImageOverridden bool `json:"imageOverridden"` LinkedImage struct { Href string `json:"href"` Alt string `json:"alt"` Image struct { Src string `json:"src"` Src2X string `json:"src@2x"` } `json:"image"` BlocksAds bool `json:"blocks_ads"` } `json:"linkedImage"` RollsEnabled bool `json:"rollsEnabled"` Links []struct { Rel string `json:"rel"` URI string `json:"uri"` } `json:"links"` RollsCount int `json:"rollsCount"` Stats struct { Average float64 `json:"average"` Rank int `json:"rank"` } `json:"stats"` }
func MyTop20Rankings ¶
type Play ¶
func GetCachedPlays ¶
func GetCachedPlays(cacheFilename string, setters ...gobgg.PlaysOptionSetter) ([]Play, error)
type Thing ¶
type Thing gobgg.ThingResult
func GetCachedThings ¶
func GetCachedThings(cacheFilename string, setters ...gobgg.GetOptionSetter) ([]Thing, error)