Code Monkey home page Code Monkey logo

alibay's Introduction

Alibay

Docs

Google Doc
Github repository

Endpoints

Signup endpoint

method:post
path:/user/signup
Expects an object { username , password } properties and their values.
ex:

    `{ username: "dennis", password: "is cool" }`

Login endpoint

method:post
path:/user/login
Expects an object with username and password properties and their values.
example:

    `{ username: "dennis", password: "is cool" }`  

It will return set a cookie equal to the session Id and send back an object with property success.
ex:
passwords match:

    `{ message: true }`  

passwords dont match:

    `{ message: false }`

Add item endpoint

method:Post
path:/items/addItem
expects an object such as :

   {"title":"desc",
    "category":"book",
    "description":"whatever",   
    "price":333, 
    "fd": "find out later",    
    "likes":20,    
    "seller":"dennis"}

any information missing or empty strings from any of these properties will return an error and not add an item to the database

remove item endpoint

method:Post
path:/items/removeItem
expect an object such as:

    {itemId:"123124129"} 

get Items

method:get
path:/items/getItems

this returns an object. the property with the results is "results" and contains all the information about the object including id

example response:

{
    "results": [
        {
            "_id": "5c630b729b48804d3c12a7f0",
            "title": "desc",
            "category": "book",
            "description": "whatever",
            "price": 333,
            "fd": "find out later",
            "likes": 20,
            "seller": "dennis"
        }
    ],
    "success": true
}

alibay's People

Contributors

konradobritzhauser avatar denisirkhin avatar code-magi avatar

Stargazers

 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.