Giter Club home page Giter Club logo

nukupi's Introduction

Build Status

Please do before commit:

The auto-formatting shortcut in IntelliJ

For windows Ctrl+Alt+L.

For ubuntu Ctrl+Alt+windows+L

For mac cmd+alt+L

Adding a product

  1. Generate unique product id (length=15) or use ours at /rest/id

  2. Make a post request to http://localhost:8080/Nukupi/rest/products with json like:

    {"title":"Eggs",
    "description":"and ham",
    "category":"food",
    "price":1000,
    "images":[],
    "authorID":"1",
    "ID":"uniqueIDfsfaf"}

If you have any images that you need to upload, post them one-by-one to http://localhost:8080/Nukupi/rest/images/PRODUCT_ID. If upload is successfull, you will get a json looking like this:

 {"date":1520173415,
 "size":231437.0, 
 "id":"2Z9gHhAIxXcIxuF"} // unix date, size in bytes, image id

You can repeat the procedure above for every image that you need to upload. After that, the product should have the following json representation:

 {"title":"Eggs",
 "description":"and ham",
 "category":"food",
 "price":1000,
 "images":["2Z9gHhAIxXcIxuF"],
 "authorID":"1",
 "ID":"uniqueIDfsfaf"}

Downloading an image

In order to download an image make a GET request to *http://localhost:8080/Nukupi/rest/images?id=IMAGE_ID

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.