Module 3, week 2, solo project for Turing School of Software and Design. This project demonstrates creation of API endpoints for a fictitious e-commerce platform - allowing API users CRUD interaction with items and merchants, as well as search capabilities.
GET /api/v1/merchants
- retrieve all merchantsGET /api/v1/merchants/{{merchant_id}}
- retrieve specified merchantGET /api/v1/merchants/{{merchant_id}}/items
- retrieve all items for specified merchantGET /api/v1/merchants/find?name={{search_string}}
- retrieves first alphabetical, case-insensitive, search resultGET /api/v1/merchants/find_all?name={{search_string}}
- retrieves all name query results sorted alphabetically
GET /api/v1/items
- retrieve all itemsGET /api/v1/items/{{item_id}}
- retrive specified itemPOST /api/v1/items
- create an item given valid parameters (name, description, unit_price, and merchant_id)PATCH /api/v1/items
- update an item given valid parametersDELETE /api/v1/items/{{item_id}}
- delete specified itemGET /api/v1/items/{{item_id}}/merchant
- retrieve merchant information for given itemGET /api/v1/items/find?name={{search_string}}
- retrieves first alphabetical, case-insensitive, search resultGET /api/v1/items/find_all?name={{search_string}}
- retrieves all name query results sorted alphabeticallyGET /api/v1/items/find_all?min_price={{search_string}}
- retrieves all items above minimum price queryGET /api/v1/items/find_all?max_price={{search_string}}
- retrieves all items below max price query- Max and min price queries can be combined in one query (
GET /api/v1/items/find_all?min_price={{min_search}}&max_price={{max_search}}
) to retrieve items in a given price range.
ruby 2.7.4
rails 5.2.8
jsonapi-serializer
simplecov
factory_bot_rails
faker