Welcome to YumYard!
Before you begin, ensure you have the following prerequisites installed:
- Ruby 3.2.0
- Rails 7.0.7
- Clone the repository:
git clone https://github.com/abwahed/yum_yard.git - Navigate to the project directory:
cd yum_yard - Install gem dependencies:
bundle install - Set up the database:
rails db:setup - Seed initial database:
rails db:seed - Start the Rails server:
rails server
Open config/database.yml file and set the password for your development mysql database.
end_point: GET base_url/api/foods
- filters : name, price, category ||
example :
base_url/api/foods?category=1&price=800&name=Pizza - paging :
base_url/api/foods?page=2
-
create
end_point: POST
base_url/api/couponsrequest body
{ "coupon" : { "food_id" : 12, "token" : "offer80", "offer_amount": 40 } } -
delete
end_point: DELETE
base_url/api/coupons/:id
end_point: POST base_url/api/:food_id/process_order
request body
{
"order" : {
"ordered": 2,
"coupon_token": "offer100"
}
}