This is a Rails 6.1.7.3 app.
This README describes the purpose of this repository and how to set up a development environment. Other sources of documentation are as follows:
- Local Server setup and how to use it via curl and Postman
- Clone this repository! tada
- (bundle install) Open your terminal and install the required dependencies
- Setup database
- Open your Postman (or terminal if you want to use curl)
- Check the available endpoints for this API
- tada You're good to go!
```
> rails db:create
> rails db:migrate
> rails db:seed
```
Fetch Users
View Followed User's sleep logs
- id -> User ID
- followed_user_id -> ID of followed User that you want to view sleep logs
Fetch Followed Users
- id -> User ID
Follow a User
- id -> User ID
- followed_user_id -> ID of the User that you want to follow
Unfollow a User
- id -> User ID
- followed_user_id -> ID of the User that you want to follow
Log sleep session
- id -> User ID
- 200 -> Success Request
- 400 -> Validation Error e.g User already followed
- 404 -> User or Followed User not found