This API uses a Rails Service Oriented Architecture, to help abstract and encapsulate our API consumption and functionality.
We've done this by parsing the "big CSV" provided by BoardGameGeek here: https://boardgamegeek.com/data_dumps/bg_ranks, into our own database. Then we created rake tasks to go through all Boardgames in the database and fill in their specific data. This way, we have one searchable and sortable boardgame database for use by our front end application.
This API includes endpoints for the following functionality:
- get the top 20 games
- get the top 20 games by subcategory:
- abstracts_rank
- cgs_rank
- childrens_games_rank
- family_games_rank
- party_games_rank
- strategy_games_rank
- thematic_rank
- wargames_rank
- get the top 20 cooperative games
- get the top 20 games based on max_players
- search by game parameters
You can find the docs for this API HERE
This API consumes from the BoardGameGeek API found HERE.
- Ruby 3.2.2
- Rails 7.0.8
- PG Gem 1.1
- rack-cors gem
- faraday
- factory_bot_rails
- faker
- RSpec Rails
- SimpleCov
- shouldamatchers
If you are running this locally, please note that you will need to import the CSV that we've created. If you are planning to fork and clone this, please reach out to one of the collaborators listed below for the CSV required.
- Fork & Clone
- Install dependencies
$ bundle install
- Create the database on your local machine
$ rails db:{create,migrate}
- Run the rake task to seed your database:
$ rails fill_database:board_games_middleman_csv
This App uses:
$ bundle exec rspec