Giter Club home page Giter Club logo

rails_engine's Introduction

Rails Engine

Description

Rails engine is a e-commerce Rails based API based off of (Little Esty Shop Data)(https://github.com/equinn125/little-esty-shop). This API allows users to query merchants, merchant items, and has CRUD functionality for all items. This API uses some RESTful principles, and has several business intelligence endpoints that allow users to find revenue for a specific merchant, as well as a count of items sold per merchant.

Gems Used

-Faker -Factory Bot -Simplecov -Figaro -JSONAPI-serializer -shoulda-matchers -pry

API Endpoints

HTTP Route Description
GET /api/v1/merchants Get all merchants (default 20 per page)
GET /api/v1/merchants?per_page=number&page=number Get all merchants using pagination
GET /api/v1/merchants/id Get one merchant by id
GET /api/v1/merchants/id/items Get all items for one merchant by id
GET /api/v1/merchants/find_all?name=texts Get all merchants by name
GET /api/v1/items Get all items (default 20 per page)
GET /api/v1/items?per_page=number&page=number Get all items using pagination)
GET /api/v1/items/id Get one item by id
POST /api/v1/items Create an item
PATCH /api/v1/items/id Update an item
Delete /api/v1/items/id Delete an item
GET /api/v1/items/id/merchant Get an item's merchant
GET /api/v1/items/find?name=text Get an item by name
GET /api/v1/items/find?min_price=number Get an item by minimum price
GET /api/v1/items/find?max_price=number Get an item by maximum price
GET /api/v1/items/find?min_price=number&max_price=number Get an item by minimum & maximum price
GET /api/v1/revenue/merchants?quantity=number Get x amount of merchants by most revenue
GET /api/v1/merchants/most_items?quantity=number Get x amount of merchants by most items
GET /api/v1/revenue/merchants/id Get revenue for a merchant by id
GET /api/v1/revenue/items?quantity=number Get x amount of items by most revenue

Technologies Used

  • Ruby on Rails 5.26
  • Ruby 2.72.
  • Travis CI
  • Postman
  • PostgreSQL
  • Postico
  • Github
  • Git
  • RSpec

Setup

  1. Fork this repository
  2. Clone your fork
  3. From the command line, install gems and set up your DB:

bundle install rails db:{drop,create,migrate, seed} rails db:schema:dump

4.Run the test suite with bundle exec rspec. 5.Run your development server with rails s to see the API app in action.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.