Coder Social home page Coder Social logo

cci-challenge's Introduction

Coding Club Internship Challenge

What Have I Implemented?

Here is a REST api of products, where user can add, find, delete or update a product

What is the data that is stored?

For a product we store the following:

  1. Name of the product
  2. Type of the product so that we can further use filters if required
  3. Stock of the product so that we can only show in-stock products to the customer, or API-callers
  4. Price, it is one of the most important data of product

How to make an API call?

There are four basic API calls possible so far on the design API URL: host_name/product 1. GET: This is used to retrieve data about product from database

  • We can ask queries in GET form using four variables
    • name(string): This filters request on the basis of name of product example: host_name/product?name=ayush
    • type(integer): This filters request on the basis of type of product example: host_name/product?type=1
    • price(integer): This filters request on the basis of price of product example: host_name/product?price=5000
    • stock(integer): This filters request on the basis of stock of product example: host_name/product?stock=10

2. POST: This is used to Create new product in the database url example: host_name/product

  • Request Body strictly require these 4 keys:
    1. name (string)
    2. price (number)
    3. stock (number)
    4. type (number)

3. PUT: This is used to Update existing product in the database with their product id url example: host_name/product/product_id

  • Request Body can consist of following keys with update values:
    1. name (string)
    2. price (number)
    3. stock (number)
    4. type (number)

4. DELETE: This is used to Delete an existing product from database url example: host_name/product/product_id

About Product and Developers?

This is hosted on heroku for deployement purposes and I don't have enough money to deploy it on AWS

cci-challenge's People

Contributors

ay2306 avatar

Watchers

 avatar

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.