This is a bowling game API built with Ruby on Rails.
-
Ruby version: You need Ruby 2.7.0 or higher installed on your machine.
-
System dependencies: You need to have Rails 6.0.0 or higher and PostgreSQL installed.
-
Configuration: Clone this repository and run
bundle install
to install the necessary gems. -
Database creation: Run
rails db:create
to create the database. -
Database initialization: Run
rails db:migrate
to run the database migrations. -
How to run the test suite: Run
bundle exec rspec
to run the tests.
- Endpoint:
POST /api/games
- Response: The created game as JSON, including its frames.
- Endpoint:
GET /api/games/:id/score
# you can collect game id from /api/games api. - Response: The game's total score and each frame's id and score as JSON.
- Endpoint:
POST /api/frames/:id/roll
# you can collect frame id from /api/games api. - Parameters:
pins
(the number of pins knocked down by the roll) - Response: The created roll as JSON.
This application is ready to be deployed on a platform like Heroku. Follow the platform's instructions for deploying a Ruby on Rails application.