{"repo":"YuKitAs/rails-rest-api","free":true,"listed":false,"github":"https://github.com/YuKitAs/rails-rest-api","clone":"git clone https://github.com/YuKitAs/rails-rest-api.git","description":"A simple RoR 6 REST API demo with JWT authentication.","language":"Ruby","stars":32,"topics":["ruby","ruby-on-rails","rest-api","restful","jwt","github-actions","rails","rails6","sqlite3"],"license":"GPL-3.0","category":"auth-billing-email","readme_excerpt":"Rails Rest API Project Setup Install all gems : Update the database with new data model : Feed the database with default seeds : Start the web server on http://localhost:3000 by default : Run all RSpec tests and Rubocop : Usage HTTP verbs Paths Used for ---------- ------ --------: POST /register Create a user POST /login Authenticate a user GET /posts List all posts GET /posts/:post id Show a single post POST /posts Create a post PUT /posts/:post id Update a post DELETE /posts/:post id Delete a post GET /posts/:post id/comments List all comments of a post GET /posts/:post id/comments/:comment id Show a single comment POST /posts/:post id/comments Create a comment PUT /posts/:post id/comments/:comment id Update a comment DELETE /posts/:post id/comments/:comment id Delete a comment Use Case Examples Authentication Create a new user : Authenticate a user : On successful login, {\"auth token\": } will be returned. This token will be expired after 24 hours. CRUD In order to access the posts and comments, add -H 'Authorization: ' to the header of every request for CRUD operations. The create , update and delete actions can only be executed by users authorized on admin. A default admin user is definded in db/seeds.rb . After seeding the database, {\"email\": \"admin@email.com\", \"password\": \"admin123\"} can be used to login as an admin. Create a new post : Create a new comment : The name field is optional with default value anonym . Update an existing post by id : Update an existing commen","default_branch":null,"files":null,"tree":[],"storefront":"/r/YuKitAs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/YuKitAs/rails-rest-api/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}