bgg

package
v0.0.0-...-4817816 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New() *Client

func (*Client) GetCollection

func (c *Client) GetCollection(username string) (*Collection, error)

func (*Client) GetThing

func (c *Client) GetThing(id int) (*Thing, error)

type Collection

type Collection struct {
	Total int              `xml:"totalitems,attr"`
	Items []CollectionItem `xml:"item"`
}

type CollectionItem

type CollectionItem struct {
	ID        int    `xml:"objectid,attr"`
	Type      string `xml:"subtype,attr"`
	Name      string `xml:"name"`
	Image     string `xml:"image"`
	Thumbnail string `xml:"thumbnail"`
}

type IValue

type IValue struct {
	Type  string `xml:"type,attr"`
	Value int    `xml:"value,attr"`
}

type Item

type Item struct {
	ID          int     `xml:"id,attr"`
	Type        string  `xml:"type,attr"`
	Image       string  `xml:"image"`
	Thumbnail   string  `xml:"thumbnail"`
	Names       []Value `xml:"name"`
	Description string  `xml:"description"`
	MinPlayers  IValue  `xml:"minplayers"`
	MaxPlayers  IValue  `xml:"maxplayers"`
	PlayTime    IValue  `xml:"playingtime"`
	MinPlayTime IValue  `xml:"minplaytime"`
	MaxPlayTime IValue  `xml:"maxplaytime"`
	Links       []Value `xml:"link"`
	Statistics  Stats   `xml:"statistics>ratings"`
}

func (*Item) Categories

func (i *Item) Categories() []string

func (*Item) Mechanics

func (i *Item) Mechanics() []string

func (*Item) Name

func (i *Item) Name() string

type Stats

type Stats struct {
	Rating Value `xml:"average"`
	Weight Value `xml:"averageweight"`
}

type Thing

type Thing struct {
	Item Item `xml:"item"`
}

type Value

type Value struct {
	Type  string `xml:"type,attr"`
	Value string `xml:"value,attr"`
}

Jump to

Keyboard shortcuts

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