Giter Club home page Giter Club logo

olsapi's Introduction

OLSAPI

RestfulAPI for adding/deleting/editing items in Cart

Setup Instructions

Using Docker Image

  • Build docker image and deploy

  • Give persmissions to the scripts.

$ sudo chmod +x [scriptname]
  • Ubuntu 14
$ sudo ./scriptubuntu16.sh
  • Ubuntu 14
$ sudo ./scriptubuntu14.sh

OR

Native Setup

  • Install node version 6.11.1
  • Run the following commands
$ sudo node application.js

Testcases

Testcases can be ran through this command.

  • Local
$ python localtests.py
  • Heroku
$ python herokutests.py

List of RestfulAPI methods

paths header params body methods description response
/api/signup username, password, confirmpassword as JSON POST sign up 'User Added. Please visit /api/authenticate to get the web token.'
/api/authenticate username, password JSON POST authenticate user Generated Token
/api/login username, password JSON POST login user You are logged in. Please provide apitoken for next routes.
/api/product token limit, category GET Get products JSON data
/api/product token JSON data POST Add products Product Added to database.
/api/product token id JSON data PUT Add products Product Updated.
/api/product token id, name, category DELETE Add products Product Updated.
/logout GET Logout user Succesfully logged out.

Here is link to postman local for more details.

Here is link to postman heroku for more details.

olsapi's People

Contributors

sunnykarira avatar

Watchers

James Cloos 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.