SiteBoardgameController
struct SiteBoardgameController : SiteControllerUtilsPages for displaying board games in the onboard Board Game Library.
- 
                  
                  DeclarationSwift func registerRoutes(_ app: Application) throws
- 
                  gamesPageHandler(_:Asynchronous) GET /boardgamesReturns a list of boardgames matching the query. Pageable. Query Parameters: - search=STRING Filter only games whose title that match the given string.
- favorite=TRUE Filter only favorites
- start=INT
- limit=INT
 DeclarationSwift func gamesPageHandler(_ req: Request) async throws -> View
- 
                  expansionPageHandler(_:Asynchronous) GET /boardgames/:boardgameID/expansionsDeclarationSwift func expansionPageHandler(_ req: Request) async throws -> View
- 
                  createFezForGame(_:Asynchronous) GET /boardgames/:boardgameID/createfezOpens the Create Fez page, prefilled with info aboutt he given board game. DeclarationSwift func createFezForGame(_ req: Request) async throws -> View
- 
                  boardgameGuideHandler(_:Asynchronous) GET /boardgames/guideFinds boardgames that match a set of user’s criteria. Uses a scoring system to find games that best match the criteria given in the URL query. With no query, just shows the input form. To avoid confusion: The API has both maxAge and minAge parameters. The URL query in the UI only has maxage, but considers the value 14 to actually be a minAge parameter. Query Parameters: - numplayers=INTThe desired number of players. Filters for games that allow this # of players, and sorts for recommendedPlayers close to this.
- timetoplay=INTHow much time you have to play. Filters for games with a avgPlayTime shorter than this, sorts for games with avgPlayTime close to this.
- maxage=INTIf nonzero, filters out games with a minAge greater than this value. Special Case: The value 14 filters out games with minAge less than 14.
- complexity=INTIf nonzero, sorts for games with near this complexity value.
 DeclarationSwift func boardgameGuideHandler(_ req: Request) async throws -> View
- 
                  addFavoriteGame(_:Asynchronous) GET /boardgame/:boardgameID/favoriteDeclarationSwift func addFavoriteGame(_ req: Request) async throws -> HTTPStatus
- 
                  removeFavoriteGame(_:Asynchronous) DELETE /boardgame/:boardgameID/favoriteDeclarationSwift func removeFavoriteGame(_ req: Request) async throws -> HTTPStatus
 View on GitHub
            View on GitHub
           SiteBoardgameController Structure Reference
      SiteBoardgameController Structure Reference