Lunch and Learn is an educational API that provides recipes, historical videos, and other fun and useful information about various countries. It also features user CRUD functionality, the ability to favorite resources by user, and session CRUD and authentication functionality.
To use the Lunch and Learn API, you will need the following:
- Ruby Version 3.x.x or higher
- A terminal application, such as Terminal (MacOS) or Windows Terminal (Windows)
Once these prerequisites are in place, please complete the following steps:
- Clone down the
lunch_and_learn_be
repository to your local machine, using the green Code button. - Navigate to the
lunch_and_learn_be
repository with your Terminal application. - From the terminal application, run the command
bundle install
- In the same terminal session, run
rails db:{drop,create,migrate}
- In the same terminal session, run
rails server
Congratulations! The Lunch and Learn API is now running on your local server, and is ready for use.
The Lunch and Learn API exposes the following endpoints for user consumption:
Expand
Creates a new user within the database, and returns a JSON response indicating either successful user creation, or unsuccessful user creation with errors.
Example Request:
POST localhost:3000/api/v1/users
Exmaple JSON Response:
{
"success": "User created successfully!"
}
Expand
Creates a new user favorite for a user, and returns a JSON response indicating either successful user creation, or unsuccessful user creation with errors.
Example Request:
POST localhost:3000/api/v1/users
Exmaple JSON Response:
{
"success": "User created successfully!"
}