BoardgameData

public struct BoardgameData : Content

Used to obtain a list of board games.

Each year there’s a list of boardgames published that’ll be brought onboard for the games library. The board game data is produced by running a script that pulls game data from http://boardgamegeek.com‘s API and merging it with the games library table.

Games in the library may not match anything in BGG’s database (or we can’t find a match), so all the BGG fields are optional.

Returned by:

  • GET /api/v3/boardgames (inside BoardgameResponseData)
  • GET /api/v3/boardgames/:boardgameID
  • GET /api/v3/boardgames/expansions/:boardgameID

See BoardgameController.getBoardgames(_:), BoardgameController.getExpansions(_:).

  • Declaration

    Swift

    var gameID: UUID
  • Name from the JoCo boardgame list

    Declaration

    Swift

    var gameName: String
  • How many copies are being brought aboard.

    Declaration

    Swift

    var numCopies: Int
  • Some games each year are loaned to the library by specific people.

    Declaration

    Swift

    var donatedBy: String?
  • Any notes on the game (specific printing, wear and tear)

    Declaration

    Swift

    var notes: String?
  • From BoardGameGeek’s API.

    Declaration

    Swift

    var yearPublished: String?
  • From BGG’s API. Usually several paragraphs.

    Declaration

    Swift

    var gameDescription: String?
  • BGG’s ‘subdomain’ value. Games can have multiple values, but often have none. BGG currently lists 8 subdomains.

    Declaration

    Swift

    var gameTypes: [String]
  • BGG’s ‘category’ value. Games can have multiple values. BGG currently lists 84 categories.

    Declaration

    Swift

    var categories: [String]
  • BGG’s ‘mechanic’ value. Games can have multiple values. BGG currently lists 192 mechanics.

    Declaration

    Swift

    var mechanics: [String]
  • From BGG’s API.

    Declaration

    Swift

    var minPlayers: Int?
  • From BGG’s API.

    Declaration

    Swift

    var maxPlayers: Int?
  • From BGG’s API. This is the value from the “numPlayers” poll that got the highest number of “Best” votes.

    Declaration

    Swift

    var suggestedPlayers: Int?
  • From BGG’s API. Playtime in minutes.

    Declaration

    Swift

    var minPlayingTime: Int?
  • From BGG’s API. Playtime in minutes.

    Declaration

    Swift

    var maxPlayingTime: Int?
  • From BGG’s API. Playtime in minutes.

    Declaration

    Swift

    var avgPlayingTime: Int?
  • From BGG’s API. Suggested min player age in years. Min age could be determined by complexity or content.

    Declaration

    Swift

    var minAge: Int?
  • From BGG’s API. How many BGG reviewers submitted ratings.

    Declaration

    Swift

    var numRatings: Int?
  • From BGG’s API. Average game rating. Members can rate games with scores in the range 1…10

    Declaration

    Swift

    var avgRating: Float?
  • From BGG’s API. Members can score a games’ complexity on a scale of 1…5, where 1 is Light and 5 is Heavy.

    Declaration

    Swift

    var complexity: Float?
  • TRUE if this entry is an expansion for another game. Weirdly, the games library may not actually have the base game. At any rate, the base game is usually a requirement to play an expansion, and both must be checked out together.

    Declaration

    Swift

    var isExpansion: Bool
  • TRUE if this game has expansions that can be played with it.

    Declaration

    Swift

    var hasExpansions: Bool
  • TRUE if the user has favorited the game. FALSE if no one is logged in.

    Declaration

    Swift

    var isFavorite: Bool
  • Declaration

    Swift

    init(game: Boardgame, isFavorite: Bool = false) throws