Giter Club home page Giter Club logo

rails-engine's Introduction

Rails Engine

Rails Engine is an open-source API that allows you to search through merchants, items, and their related invoices. It allows you to retrieve information like revenue and how many items have been sold.

Table of Contents

Authors

Getting Started

Versions

  • Rails 5.2.5

  • Ruby 2.5.3

Setup

1. Clone Repo
2. Install gem packages: `bundle install`
3. Setup, Migrate and Seed the database: `rails db:(create,migrate,seed)`

Built With

  • Ruby/Rails

Endpoints

Merchants

  • GET /api/v1/merchants
    • Allows you to retrieve all merchants
  • GET /api/v1/merchants?per_page={number}&page={number}
    • Allows you to retrieve one page of merchants based on page number and based on how many merchants per page.
  • GET /api/v1/merchants/{merchant_id}
    • Allows you to retrieve a merchant based on merchant_id
  • GET /api/v1/merchants/{merchant_id}/items
    • Allows you to retrieve a merchant's items based on merchant_id

Search Merchants

  • GET /api/v1/merchants/find?name={name}
    • Allows you to retrieve one merchant by name fragment
  • GET /api/v1/merchants/find_all?name={name}
    • Allows you to retrieve merchants by name fragment in alphabetical order

Items

  • GET /api/v1/items
    • Allows you to retrieve all merchants
    • GET /api/v1/items?per_page={number}&page={number}
      • Allows you to retrieve one page of items based on page number and based on how many items per page.
  • GET /api/v1/items/{item_id}
    • Allows you to retrieve an item based on item_id
  • POST /api/v1/items
    • Allows you to create a new item
  • DELETE /api/v1/items/{item_id}
    • Allows you to delete an item based on item_id
  • PUT /api/v1/items/{item_id}
    • Allows you to update an item based on item_id
  • GET /api/v1/items/{item_id}/merchant
    • Allows you to retrieve an item's merchant based on item_id

Search Items

  • GET /api/v1/items/find?name={name}
    • Allows you to retrieve one item by name fragment
  • GET /api/v1/items/find?min_price={number}
    • Allows you to retrieve one item with a price equal to or greater than min_price
  • GET /api/v1/items/find?max_price={number}
    • Allows you to retrieve one item with a price equal to or less than max_price
  • GET /api/v1/items/find?min_price={number}&max_price={number}
    • Allows you to retrieve one item with a price equal to or greater than min_price and equal to or less than max_price
  • GET /api/v1/items/find_all?name={name}
    • Allows you to retrieve items by name fragment in alphabetical order
  • GET /api/v1/items/find_all?min_price={number}
    • Allows you to retrieve all items with a price equal to or greater than min_price
  • GET /api/v1/items/find_all?max_price={number}
    • Allows you to retrieve all items with a price equal to or less than max_price
  • GET /api/v1/items/find_all?min_price={number}&max_price={number}
    • Allows you to retrieve all items with a price equal to or greater than min_price and equal to or less than max_price

Business Intelligence

  • GET api/v1/revenue/merchants?quantity={number}
    • Allows you to get the top x number of merchants with the most revenue based on quantity
  • GET /api/v1/merchants/most_items?quantity={number}
    • Allows you to get the top x number of merchants with the most items based on quantity
  • GET /api/v1/revenue/items?quantity={number}
    • Allows you to get the top x number of items with the most revenue based on quantity
  • GET /api/v1/revenue/unshipped?quantity={number}
    • Allows you to get the top x number of invoices with the most potential revenue in unshipped items based on quantity

License

This belongs to Jenny Branham.

rails-engine's People

Contributors

jbranham1 avatar

Watchers

 avatar

rails-engine's Issues

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.